Module: Payments
- Included in:
- TessituraRest
- Defined in:
- lib/tessitura_rest/txn/payments.rb
Instance Method Summary collapse
- #get_on_account_balance(_current_user, _payment_method_id, options = {}) ⇒ Object
- #reserve_payment_id(options = {}) ⇒ Object
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 get_on_account_balance(_current_user, _payment_method_id, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("TXN/Payments/OnAccount?constituentId=#{_current_user}&paymentMethodId=#{_payment_method_id}"), ) 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( = {}) parameters = { 'Increment': 1, } .merge!(basic_auth: @auth, headers: @headers) .merge!(:body => parameters.to_json) self.class.post(base_api_endpoint('TXN/Payments/ReserveIds'), ) end |