Sha256: cf53a623102fc308d7e43e8162a10c3ca1943319289efff478bb9dfc12a10970

Contents?: true

Size: 472 Bytes

Versions: 6

Compression:

Stored size: 472 Bytes

Contents

# frozen_string_literal: true

module Afterpay
  module API
    module Payment
      class Auth < Base
        def initialize(params = {})
          @payment = params[:payment]
        end

        private

        attr_reader :payment

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

        def endpoint
          "#{URL}/auth"
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
afterpay-0.6.0 lib/afterpay/api/payment/auth.rb
afterpay-0.5.0 lib/afterpay/api/payment/auth.rb
afterpay-0.4.0 lib/afterpay/api/payment/auth.rb
afterpay-0.3.0 lib/afterpay/api/payment/auth.rb
afterpay-0.2.0 lib/afterpay/api/payment/auth.rb
afterpay-0.1.0 lib/afterpay/api/payment/auth.rb