Sha256: a59f8b534174fb50cc98351342d080bc76090fcdd30fbd1d4a4a6cc3b6fe09f6

Contents?: true

Size: 438 Bytes

Versions: 6

Compression:

Stored size: 438 Bytes

Contents

# frozen_string_literal: true

module Afterpay
  module API
    module Order
      class Create < Base
        def initialize(params = {})
          @order = params[:order]
        end

        private

        attr_reader :order

        def payload
          {
            action: :post,
            body: order.as_json,
            endpoint: endpoint
          }
        end

        def endpoint; URL; end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
afterpay-0.6.0 lib/afterpay/api/order/create.rb
afterpay-0.5.0 lib/afterpay/api/order/create.rb
afterpay-0.4.0 lib/afterpay/api/order/create.rb
afterpay-0.3.0 lib/afterpay/api/order/create.rb
afterpay-0.2.0 lib/afterpay/api/order/create.rb
afterpay-0.1.0 lib/afterpay/api/order/create.rb