Class: Clerk::Models::Components::BillingPaymentAttempt

Inherits:
Object
  • Object
show all
Includes:
Crystalline::MetadataFields
Defined in:
lib/clerk/models/components/billingpaymentattempt.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(object:, id:, payment_id:, instance_id:, charge_type:, payee_id:, payee:, payer_id:, payer:, amount:, payment_method_id:, payment_method:, statement_id:, status:, created_at:, updated_at:, subscription_item_id: nil, subscription_item: nil, gateway_external_id: nil, gateway_external_url: nil, paid_at: nil, failed_at: nil) ⇒ BillingPaymentAttempt

Returns a new instance of BillingPaymentAttempt.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/clerk/models/components/billingpaymentattempt.rb', line 61

def initialize(object:, id:, payment_id:, instance_id:, charge_type:, payee_id:, payee:, payer_id:, payer:, amount:, payment_method_id:, payment_method:, statement_id:, status:, created_at:, updated_at:, subscription_item_id: nil, subscription_item: nil, gateway_external_id: nil, gateway_external_url: nil, paid_at: nil, failed_at: nil)
  @object = object
  @id = id
  @payment_id = payment_id
  @instance_id = instance_id
  @charge_type = charge_type
  @payee_id = payee_id
  @payee = payee
  @payer_id = payer_id
  @payer = payer
  @amount = amount
  @payment_method_id = payment_method_id
  @payment_method = payment_method
  @statement_id = statement_id
  @status = status
  @created_at = created_at
  @updated_at = updated_at
  @subscription_item_id = subscription_item_id
  @subscription_item = subscription_item
  @gateway_external_id = gateway_external_id
  @gateway_external_url = gateway_external_url
  @paid_at = paid_at
  @failed_at = failed_at
end

Instance Method Details

#==(other) ⇒ Object



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/clerk/models/components/billingpaymentattempt.rb', line 87

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 @payment_id == other.payment_id
  return false unless @instance_id == other.instance_id
  return false unless @charge_type == other.charge_type
  return false unless @payee_id == other.payee_id
  return false unless @payee == other.payee
  return false unless @payer_id == other.payer_id
  return false unless @payer == other.payer
  return false unless @amount == other.amount
  return false unless @payment_method_id == other.payment_method_id
  return false unless @payment_method == other.payment_method
  return false unless @statement_id == other.statement_id
  return false unless @status == other.status
  return false unless @created_at == other.created_at
  return false unless @updated_at == other.updated_at
  return false unless @subscription_item_id == other.subscription_item_id
  return false unless @subscription_item == other.subscription_item
  return false unless @gateway_external_id == other.gateway_external_id
  return false unless @gateway_external_url == other.gateway_external_url
  return false unless @paid_at == other.paid_at
  return false unless @failed_at == other.failed_at
  true
end