Class: Remit::API

Constant Summary collapse

API_ENDPOINT =
'https://fps.amazonaws.com/'.freeze
API_SANDBOX_ENDPOINT =
'https://fps.sandbox.amazonaws.com/'.freeze
PIPELINE_URL =
'https://authorize.payments.amazon.com/cobranded-ui/actions/start'.freeze
PIPELINE_SANDBOX_URL =
'https://authorize.payments-sandbox.amazon.com/cobranded-ui/actions/start'.freeze
API_VERSION =
Date.new(2007, 1, 8).to_s.freeze
SIGNATURE_VERSION =
1.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WriteOffDebt

#write_off_debt

Methods included from UnsubscribeForCallerNotification

#unsubscribe_for_caller_notification

Methods included from SubscribeForCallerNotification

#subscribe_for_caller_notification

Methods included from SettleDebt

#settle_debt

Methods included from Settle

#settle

Methods included from RetryTransaction

#retry_transaction

Methods included from Reserve

#reserve

Methods included from Refund

#refund

Methods included from Pay

#pay

Methods included from InstallPaymentInstruction

#install_payment_instruction

Methods included from GetTransaction

#get_transaction

Methods included from GetTotalPrepaidLiability

#get_total_prepaid_liability

Methods included from GetTokenByCaller

#get_token_by_caller

Methods included from GetTokens

#get_tokens

Methods included from GetTokenUsage

#get_token_usage

Methods included from GetResults

#get_results

Methods included from GetPrepaidBalance

#get_prepaid_balance

Methods included from GetPipeline

#get_multi_use_pipeline, #get_pipeline, #get_postpaid_pipeline, #get_recipient_pipeline, #get_recurring_use_pipeline, #get_single_use_pipeline

Methods included from GetPaymentInstruction

#get_payment_instruction

Methods included from GetOutstandingDebtBalance

#get_outstanding_debt_balance

Methods included from GetDebtBalance

#get_debt_balance

Methods included from GetAllPrepaidInstruments

#get_all_prepaid_instruments

Methods included from GetAllCreditInstruments

#get_all_credit_instruments

Methods included from GetAccountBalance

#get_account_balance

Methods included from GetAccountActivity

#get_account_activity

Methods included from FundPrepaid

#fund_prepaid

Methods included from DiscardResults

#discard_results

Methods included from CancelToken

#cancel_token

Methods included from CancelSubscriptionAndRefund

#cancel_subscription_and_refund

Constructor Details

#initialize(access_key, secret_key, sandbox = false) ⇒ API

Returns a new instance of API.



94
95
96
97
98
99
100
# File 'lib/remit.rb', line 94

def initialize(access_key, secret_key, sandbox=false)
  @access_key = access_key
  @secret_key = secret_key
  @pipeline_url = sandbox ? PIPELINE_SANDBOX_URL : PIPELINE_URL

  super(sandbox ? API_SANDBOX_ENDPOINT : API_ENDPOINT)
end

Instance Attribute Details

#access_keyObject (readonly)

Returns the value of attribute access_key.



90
91
92
# File 'lib/remit.rb', line 90

def access_key
  @access_key
end

#pipeline_urlObject (readonly)

Returns the value of attribute pipeline_url.



92
93
94
# File 'lib/remit.rb', line 92

def pipeline_url
  @pipeline_url
end

#secret_keyObject (readonly)

Returns the value of attribute secret_key.



91
92
93
# File 'lib/remit.rb', line 91

def secret_key
  @secret_key
end