Class: Clerk::Models::Components::CommerceDiscountRedemptionResponse
- Inherits:
-
Object
- Object
- Clerk::Models::Components::CommerceDiscountRedemptionResponse
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/commercediscountredemptionresponse.rb
Overview
A commerce discount redemption.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(object:, id:, subscription_item_id:, discount_id:, source:, cycles_applied:, redeemed_at:, name: nil, promo_code: nil, effect: nil, cycles_remaining: nil, status: nil, redeemed_by: nil, percent_off: nil, amount_off: nil, amount: nil) ⇒ CommerceDiscountRedemptionResponse
constructor
A new instance of CommerceDiscountRedemptionResponse.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(object:, id:, subscription_item_id:, discount_id:, source:, cycles_applied:, redeemed_at:, name: nil, promo_code: nil, effect: nil, cycles_remaining: nil, status: nil, redeemed_by: nil, percent_off: nil, amount_off: nil, amount: nil) ⇒ CommerceDiscountRedemptionResponse
Returns a new instance of CommerceDiscountRedemptionResponse.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/clerk/models/components/commercediscountredemptionresponse.rb', line 50 def initialize(object:, id:, subscription_item_id:, discount_id:, source:, cycles_applied:, redeemed_at:, name: nil, promo_code: nil, effect: nil, cycles_remaining: nil, status: nil, redeemed_by: nil, percent_off: nil, amount_off: nil, amount: nil) @object = object @id = id @subscription_item_id = subscription_item_id @discount_id = discount_id @source = source @cycles_applied = cycles_applied @redeemed_at = redeemed_at @name = name @promo_code = promo_code @effect = effect @cycles_remaining = cycles_remaining @status = status @redeemed_by = redeemed_by @percent_off = percent_off @amount_off = amount_off @amount = amount end |
Instance Method Details
#==(other) ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/clerk/models/components/commercediscountredemptionresponse.rb', line 70 def ==(other) return false unless other.is_a? self.class return false unless @object == other.object return false unless @id == other.id return false unless @subscription_item_id == other.subscription_item_id return false unless @discount_id == other.discount_id return false unless @source == other.source return false unless @cycles_applied == other.cycles_applied return false unless @redeemed_at == other.redeemed_at return false unless @name == other.name return false unless @promo_code == other.promo_code return false unless @effect == other.effect return false unless @cycles_remaining == other.cycles_remaining return false unless @status == other.status return false unless @redeemed_by == other.redeemed_by return false unless @percent_off == other.percent_off return false unless @amount_off == other.amount_off return false unless @amount == other.amount true end |