Class: Workarea::GlobalE::Merchant::Customer

Inherits:
Object
  • Object
show all
Defined in:
app/services/workarea/global_e/merchant/customer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Customer

Returns a new instance of Customer.



7
8
9
# File 'app/services/workarea/global_e/merchant/customer.rb', line 7

def initialize(hash)
  @hash = hash
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



5
6
7
# File 'app/services/workarea/global_e/merchant/customer.rb', line 5

def hash
  @hash
end

Instance Method Details

#is_end_customer_primaryBoolean

Indicates if end customer details are “swapped” with a paying (Global-e) customer’s details when submitting the order to the Merchant. By default IsEndCustomerPrimary is FALSE which means that Primary customer denotes the paying (Global-e) customer and Secondary customer denotes the end customer who has placed the order with Global-e checkout

Returns:

  • (Boolean)


30
31
32
# File 'app/services/workarea/global_e/merchant/customer.rb', line 30

def is_end_customer_primary
  hash["IsEndCustomerPrimary"]
end

#send_confirmationBoolean

Indicates if e-mail confirmation of the respective order’s status change needs to be sent to the paying customer (Global-e acts as a paying customer).

Returns:

  • (Boolean)


17
18
19
# File 'app/services/workarea/global_e/merchant/customer.rb', line 17

def send_confirmation
  hash["SendConfirmation"]
end