Class: Affirm::Struct::Transaction

Inherits:
Base
  • Object
show all
Defined in:
lib/affirm/structs/transaction.rb

Defined Under Namespace

Classes: Event

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Affirm::Struct::Base

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



5
6
7
# File 'lib/affirm/structs/transaction.rb', line 5

def amount
  @amount
end

#amount_refundedObject

Returns the value of attribute amount_refunded.



6
7
8
# File 'lib/affirm/structs/transaction.rb', line 6

def amount_refunded
  @amount_refunded
end

#authorization_expirationObject

Returns the value of attribute authorization_expiration.



7
8
9
# File 'lib/affirm/structs/transaction.rb', line 7

def authorization_expiration
  @authorization_expiration
end

#checkout_idObject

Returns the value of attribute checkout_id.



8
9
10
# File 'lib/affirm/structs/transaction.rb', line 8

def checkout_id
  @checkout_id
end

#createdObject

Returns the value of attribute created.



9
10
11
# File 'lib/affirm/structs/transaction.rb', line 9

def created
  @created
end

#currencyObject

Returns the value of attribute currency.



10
11
12
# File 'lib/affirm/structs/transaction.rb', line 10

def currency
  @currency
end

#eventsObject

Returns the value of attribute events.



11
12
13
# File 'lib/affirm/structs/transaction.rb', line 11

def events
  @events
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/affirm/structs/transaction.rb', line 4

def id
  @id
end

#order_idObject

Returns the value of attribute order_id.



12
13
14
# File 'lib/affirm/structs/transaction.rb', line 12

def order_id
  @order_id
end

#provider_idObject

Returns the value of attribute provider_id.



13
14
15
# File 'lib/affirm/structs/transaction.rb', line 13

def provider_id
  @provider_id
end

#statusObject

Returns the value of attribute status.



14
15
16
# File 'lib/affirm/structs/transaction.rb', line 14

def status
  @status
end

Instance Method Details

#providerObject



16
17
18
19
20
21
22
23
# File 'lib/affirm/structs/transaction.rb', line 16

def provider
  case provider_id
  when 1
    :affirm
  when 2
    :katapult
  end
end