Class: Clerk::Models::Components::CommerceSubscriptionItem
- Inherits:
-
Object
- Object
- Clerk::Models::Components::CommerceSubscriptionItem
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/commercesubscriptionitem.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(object:, id:, instance_id:, status:, plan_period:, payer_id:, is_free_trial:, period_start:, credit: nil, plan_id: nil, price_id: nil, payment_method: nil, lifetime_paid: nil, payer: nil, period_end: nil, proration_date: nil, canceled_at: nil, past_due_at: nil, ended_at: nil, created_at: nil, updated_at: nil, plan: nil, next_payment: nil) ⇒ CommerceSubscriptionItem
constructor
A new instance of CommerceSubscriptionItem.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(object:, id:, instance_id:, status:, plan_period:, payer_id:, is_free_trial:, period_start:, credit: nil, plan_id: nil, price_id: nil, payment_method: nil, lifetime_paid: nil, payer: nil, period_end: nil, proration_date: nil, canceled_at: nil, past_due_at: nil, ended_at: nil, created_at: nil, updated_at: nil, plan: nil, next_payment: nil) ⇒ CommerceSubscriptionItem
Returns a new instance of CommerceSubscriptionItem.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/clerk/models/components/commercesubscriptionitem.rb', line 63 def initialize(object:, id:, instance_id:, status:, plan_period:, payer_id:, is_free_trial:, period_start:, credit: nil, plan_id: nil, price_id: nil, payment_method: nil, lifetime_paid: nil, payer: nil, period_end: nil, proration_date: nil, canceled_at: nil, past_due_at: nil, ended_at: nil, created_at: nil, updated_at: nil, plan: nil, next_payment: nil) @object = object @id = id @instance_id = instance_id @status = status @plan_period = plan_period @payer_id = payer_id @is_free_trial = is_free_trial @period_start = period_start @credit = credit @plan_id = plan_id @price_id = price_id @payment_method = payment_method @lifetime_paid = lifetime_paid @payer = payer @period_end = period_end @proration_date = proration_date @canceled_at = canceled_at @past_due_at = past_due_at @ended_at = ended_at @created_at = created_at @updated_at = updated_at @plan = plan @next_payment = next_payment end |
Instance Method Details
#==(other) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/clerk/models/components/commercesubscriptionitem.rb', line 90 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 @instance_id == other.instance_id return false unless @status == other.status return false unless @plan_period == other.plan_period return false unless @payer_id == other.payer_id return false unless @is_free_trial == other.is_free_trial return false unless @period_start == other.period_start return false unless @credit == other.credit return false unless @plan_id == other.plan_id return false unless @price_id == other.price_id return false unless @payment_method == other.payment_method return false unless @lifetime_paid == other.lifetime_paid return false unless @payer == other.payer return false unless @period_end == other.period_end return false unless @proration_date == other.proration_date return false unless @canceled_at == other.canceled_at return false unless @past_due_at == other.past_due_at return false unless @ended_at == other.ended_at return false unless @created_at == other.created_at return false unless @updated_at == other.updated_at return false unless @plan == other.plan return false unless @next_payment == other.next_payment true end |