Sha256: d2f5afb9daddefe362691c748f623addffd8453fb8b5cfacc272814c463cf92e

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

module Workarea
  module GlobalE
    module Merchant
      class Customer
        attr_reader :hash

        def initialize(hash)
          @hash = hash
        end

        # 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).
        #
        # @return [Boolean]
        #
        def send_confirmation
          hash["SendConfirmation"]
        end

        # 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
        #
        # @return [Boolean]
        #
        def is_end_customer_primary
          hash["IsEndCustomerPrimary"]
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-global_e-1.3.0 app/services/workarea/global_e/merchant/customer.rb
workarea-global_e-1.2.1 app/services/workarea/global_e/merchant/customer.rb