Module: Payments

Included in:
TessituraRest
Defined in:
lib/tessitura_rest/txn/payments.rb

Instance Method Summary collapse

Instance Method Details

#get_on_account_balance(_current_user, _payment_method_id, options = {}) ⇒ Object



2
3
4
5
6
# File 'lib/tessitura_rest/txn/payments.rb', line 2

def (_current_user, _payment_method_id, options = {})
  options.merge!(basic_auth: @auth, headers: @headers)
  response = self.class.get(base_api_endpoint("TXN/Payments/OnAccount?constituentId=#{_current_user}&paymentMethodId=#{_payment_method_id}"), options)
  JSON.parse(response.body)
end

#reserve_payment_id(options = {}) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/tessitura_rest/txn/payments.rb', line 8

def reserve_payment_id(options = {})
  parameters = {
    'Increment': 1,
  }
  options.merge!(basic_auth: @auth, headers: @headers)
  options.merge!(:body => parameters)
  self.class.post(base_api_endpoint('TXN/Payments/ReserveIds'), options)
end