Class: Affirm::ChargeEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/affirm/charge_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ ChargeEvent

Returns a new instance of ChargeEvent.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/affirm/charge_event.rb', line 7

def initialize(attrs)
  @id                    = attrs["id"]
  @transaction_id        = attrs["transaction_id"]
  @type                  = attrs["type"]
  @created               = attrs["created"]
  @amount                = attrs["amount"]
  @fee                   = attrs["fee"]
  @order_id              = attrs["order_id"]
  @shipping_carrier      = attrs["shipping_carrier"]
  @shipping_confirmation = attrs["shipping_confirmation"]
  @fee_refunded          = attrs["fee_refunded"]
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def amount
  @amount
end

#createdObject (readonly)

Returns the value of attribute created.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def created
  @created
end

#feeObject (readonly)

Returns the value of attribute fee.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def fee
  @fee
end

#fee_refundedObject (readonly)

Returns the value of attribute fee_refunded.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def fee_refunded
  @fee_refunded
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def id
  @id
end

#order_idObject (readonly)

Returns the value of attribute order_id.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def order_id
  @order_id
end

#shipping_carrierObject (readonly)

Returns the value of attribute shipping_carrier.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def shipping_carrier
  @shipping_carrier
end

#shipping_confirmationObject (readonly)

Returns the value of attribute shipping_confirmation.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def shipping_confirmation
  @shipping_confirmation
end

#transaction_idObject (readonly)

Returns the value of attribute transaction_id.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def transaction_id
  @transaction_id
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/affirm/charge_event.rb', line 3

def type
  @type
end