Class: Afterpay::Components::Order

Inherits:
Base
  • Object
show all
Defined in:
lib/afterpay/components/order.rb

Instance Attribute Summary collapse

Method Summary

Methods included from Initializable

included, #initialize

Methods included from Representable

#as_json, included

Instance Attribute Details

#amountAfterpay::Components::Money

Total amount for order to be charged to consumer.



9
10
11
# File 'lib/afterpay/components/order.rb', line 9

def amount
  @amount
end

#billingAfterpay::Components::Contact

Billing address.



19
20
21
# File 'lib/afterpay/components/order.rb', line 19

def billing
  @billing
end

#consumerAfterpay::Components::Consumer

The consumer requesting the order.



14
15
16
# File 'lib/afterpay/components/order.rb', line 14

def consumer
  @consumer
end

#courierAfterpay::Components::Courier

Shipping Courier details.



29
30
31
# File 'lib/afterpay/components/order.rb', line 29

def courier
  @courier
end

#discountsArray<Afterpay::Components::Discount>

An array of discounts.

Returns:



39
40
41
# File 'lib/afterpay/components/order.rb', line 39

def discounts
  @discounts
end

#itemsArray<Afterpay::Components::Item>

An array of order items.

Returns:



34
35
36
# File 'lib/afterpay/components/order.rb', line 34

def items
  @items
end

#merchantAfterpay::Components::Merchant

Merchant’s redirection links..



44
45
46
# File 'lib/afterpay/components/order.rb', line 44

def merchant
  @merchant
end

#merchant_referenceString

The merchant’s id / reference that this order corresponds to.

Returns:

  • (String)


54
55
56
# File 'lib/afterpay/components/order.rb', line 54

def merchant_reference
  @merchant_reference
end

#modeString

Set to ‘express` for an express-flow checkout.

Returns:

  • (String)


69
70
71
# File 'lib/afterpay/components/order.rb', line 69

def mode
  @mode
end

#payment_typeString

Supported payment types: ‘PAY_BY_INSTALLMENT’. Default is ‘PAY_BY_INSTALLMENT’.

Returns:

  • (String)


49
50
51
# File 'lib/afterpay/components/order.rb', line 49

def payment_type
  @payment_type
end

#shippingAfterpay::Components::Contact

Shipping address.



24
25
26
# File 'lib/afterpay/components/order.rb', line 24

def shipping
  @shipping
end

#shipping_amountAfterpay::Components::Money

The shipping amount.



64
65
66
# File 'lib/afterpay/components/order.rb', line 64

def shipping_amount
  @shipping_amount
end

#tax_amountAfterpay::Components::Money

The included tax amount after applying all discounts.



59
60
61
# File 'lib/afterpay/components/order.rb', line 59

def tax_amount
  @tax_amount
end