Class: ModernTreasury::Resources::PaymentFlows
- Inherits:
-
Object
- Object
- ModernTreasury::Resources::PaymentFlows
- Defined in:
- lib/modern_treasury/resources/payment_flows.rb
Instance Method Summary collapse
-
#create(amount: , counterparty_id: , currency: , direction: , originating_account_id: , due_date: nil, request_options: {}) ⇒ ModernTreasury::Models::PaymentFlow
Some parameter documentations has been truncated, see Models::PaymentFlowCreateParams for more details.
-
#initialize(client:) ⇒ PaymentFlows
constructor
private
A new instance of PaymentFlows.
-
#list(after_cursor: nil, client_token: nil, counterparty_id: nil, originating_account_id: nil, payment_order_id: nil, per_page: nil, receiving_account_id: nil, status: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::PaymentFlow>
list payment_flows.
-
#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::PaymentFlow
get payment_flow.
-
#update(id, status: , request_options: {}) ⇒ ModernTreasury::Models::PaymentFlow
Some parameter documentations has been truncated, see Models::PaymentFlowUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ PaymentFlows
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PaymentFlows.
120 121 122 |
# File 'lib/modern_treasury/resources/payment_flows.rb', line 120 def initialize(client:) @client = client end |
Instance Method Details
#create(amount: , counterparty_id: , currency: , direction: , originating_account_id: , due_date: nil, request_options: {}) ⇒ ModernTreasury::Models::PaymentFlow
Some parameter documentations has been truncated, see Models::PaymentFlowCreateParams for more details.
create payment_flow
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/modern_treasury/resources/payment_flows.rb', line 30 def create(params) parsed, = ModernTreasury::PaymentFlowCreateParams.dump_request(params) @client.request( method: :post, path: "api/payment_flows", body: parsed, model: ModernTreasury::PaymentFlow, options: ) end |
#list(after_cursor: nil, client_token: nil, counterparty_id: nil, originating_account_id: nil, payment_order_id: nil, per_page: nil, receiving_account_id: nil, status: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::PaymentFlow>
list payment_flows
105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/modern_treasury/resources/payment_flows.rb', line 105 def list(params = {}) parsed, = ModernTreasury::PaymentFlowListParams.dump_request(params) @client.request( method: :get, path: "api/payment_flows", query: parsed, page: ModernTreasury::Internal::Page, model: ModernTreasury::PaymentFlow, options: ) end |
#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::PaymentFlow
get payment_flow
52 53 54 55 56 57 58 59 |
# File 'lib/modern_treasury/resources/payment_flows.rb', line 52 def retrieve(id, params = {}) @client.request( method: :get, path: ["api/payment_flows/%1$s", id], model: ModernTreasury::PaymentFlow, options: params[:request_options] ) end |
#update(id, status: , request_options: {}) ⇒ ModernTreasury::Models::PaymentFlow
Some parameter documentations has been truncated, see Models::PaymentFlowUpdateParams for more details.
update payment_flow
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/modern_treasury/resources/payment_flows.rb', line 77 def update(id, params) parsed, = ModernTreasury::PaymentFlowUpdateParams.dump_request(params) @client.request( method: :patch, path: ["api/payment_flows/%1$s", id], body: parsed, model: ModernTreasury::PaymentFlow, options: ) end |