Class: Modulr::Resources::Payments::Payment

Inherits:
Base
  • Object
show all
Defined in:
lib/modulr/resources/payments/payment.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

map

Constructor Details

#initialize(response, attributes = {}, opts = { network_scheme: true }) ⇒ Payment

Returns a new instance of Payment.



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/modulr/resources/payments/payment.rb', line 18

def initialize(response, attributes = {}, opts = { network_scheme: true })
  super(response, attributes)

  @attributes = attributes
  @opts = opts
  parse_attributes
  @end_to_end_id = if incoming_sepa?
                     sepa_end_to_end_id
                   elsif incoming_faster_payments?
                     faster_payments_end_to_end_id
                   end
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



7
8
9
# File 'lib/modulr/resources/payments/payment.rb', line 7

def details
  @details
end

#end_to_end_idObject (readonly)

Returns the value of attribute end_to_end_id.



7
8
9
# File 'lib/modulr/resources/payments/payment.rb', line 7

def end_to_end_id
  @end_to_end_id
end

#networkObject (readonly)

Returns the value of attribute network.



7
8
9
# File 'lib/modulr/resources/payments/payment.rb', line 7

def network
  @network
end

#schemeObject (readonly)

Returns the value of attribute scheme.



7
8
9
# File 'lib/modulr/resources/payments/payment.rb', line 7

def scheme
  @scheme
end