Class: ModernTreasury::Resources::PaymentOrders
- Inherits:
-
Object
- Object
- ModernTreasury::Resources::PaymentOrders
- Defined in:
- lib/modern_treasury/resources/payment_orders.rb,
lib/modern_treasury/resources/payment_orders/reversals.rb
Defined Under Namespace
Classes: Reversals
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#create(amount: , direction: , originating_account_id: , type: , accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, charge_bearer: nil, currency: nil, description: nil, documents: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {}) ⇒ ModernTreasury::Models::PaymentOrder
Some parameter documentations has been truncated, see Models::PaymentOrderCreateParams for more details.
-
#create_async(amount: , direction: , originating_account_id: , type: , accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, charge_bearer: nil, currency: nil, description: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {}) ⇒ ModernTreasury::Models::AsyncResponse
Some parameter documentations has been truncated, see Models::PaymentOrderCreateAsyncParams for more details.
-
#initialize(client:) ⇒ PaymentOrders
constructor
private
A new instance of PaymentOrders.
-
#list(after_cursor: nil, counterparty_id: nil, created_at_end: nil, created_at_start: nil, direction: nil, effective_date_end: nil, effective_date_start: nil, external_id: nil, metadata: nil, originating_account_id: nil, per_page: nil, priority: nil, process_after_end: nil, process_after_start: nil, reference_number: nil, status: nil, transaction_id: nil, type: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::PaymentOrder>
Some parameter documentations has been truncated, see Models::PaymentOrderListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::PaymentOrder
Get details on a single payment order.
-
#update(id, accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, amount: nil, charge_bearer: nil, counterparty_id: nil, currency: nil, description: nil, direction: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_account_id: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, status: nil, subtype: nil, type: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {}) ⇒ ModernTreasury::Models::PaymentOrder
Some parameter documentations has been truncated, see Models::PaymentOrderUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ PaymentOrders
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 PaymentOrders.
378 379 380 381 |
# File 'lib/modern_treasury/resources/payment_orders.rb', line 378 def initialize(client:) @client = client @reversals = ModernTreasury::Resources::PaymentOrders::Reversals.new(client: client) end |
Instance Attribute Details
#reversals ⇒ ModernTreasury::Resources::PaymentOrders::Reversals (readonly)
7 8 9 |
# File 'lib/modern_treasury/resources/payment_orders.rb', line 7 def reversals @reversals end |
Instance Method Details
#create(amount: , direction: , originating_account_id: , type: , accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, charge_bearer: nil, currency: nil, description: nil, documents: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {}) ⇒ ModernTreasury::Models::PaymentOrder
Some parameter documentations has been truncated, see Models::PaymentOrderCreateParams for more details.
Create a new Payment Order
95 96 97 98 99 100 101 102 103 104 |
# File 'lib/modern_treasury/resources/payment_orders.rb', line 95 def create(params) parsed, = ModernTreasury::PaymentOrderCreateParams.dump_request(params) @client.request( method: :post, path: "api/payment_orders", body: parsed, model: ModernTreasury::PaymentOrder, options: ) end |
#create_async(amount: , direction: , originating_account_id: , type: , accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, charge_bearer: nil, currency: nil, description: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {}) ⇒ ModernTreasury::Models::AsyncResponse
Some parameter documentations has been truncated, see Models::PaymentOrderCreateAsyncParams for more details.
Create a new payment order asynchronously
364 365 366 367 368 369 370 371 372 373 |
# File 'lib/modern_treasury/resources/payment_orders.rb', line 364 def create_async(params) parsed, = ModernTreasury::PaymentOrderCreateAsyncParams.dump_request(params) @client.request( method: :post, path: "api/payment_orders/create_async", body: parsed, model: ModernTreasury::AsyncResponse, options: ) end |
#list(after_cursor: nil, counterparty_id: nil, created_at_end: nil, created_at_start: nil, direction: nil, effective_date_end: nil, effective_date_start: nil, external_id: nil, metadata: nil, originating_account_id: nil, per_page: nil, priority: nil, process_after_end: nil, process_after_start: nil, reference_number: nil, status: nil, transaction_id: nil, type: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::PaymentOrder>
Some parameter documentations has been truncated, see Models::PaymentOrderListParams for more details.
Get a list of all payment orders
268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/modern_treasury/resources/payment_orders.rb', line 268 def list(params = {}) parsed, = ModernTreasury::PaymentOrderListParams.dump_request(params) @client.request( method: :get, path: "api/payment_orders", query: parsed, page: ModernTreasury::Internal::Page, model: ModernTreasury::PaymentOrder, options: ) end |
#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::PaymentOrder
Get details on a single payment order
116 117 118 119 120 121 122 123 |
# File 'lib/modern_treasury/resources/payment_orders.rb', line 116 def retrieve(id, params = {}) @client.request( method: :get, path: ["api/payment_orders/%1$s", id], model: ModernTreasury::PaymentOrder, options: params[:request_options] ) end |
#update(id, accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, amount: nil, charge_bearer: nil, counterparty_id: nil, currency: nil, description: nil, direction: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_account_id: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, status: nil, subtype: nil, type: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {}) ⇒ ModernTreasury::Models::PaymentOrder
Some parameter documentations has been truncated, see Models::PaymentOrderUpdateParams for more details.
Update a payment order
209 210 211 212 213 214 215 216 217 218 |
# File 'lib/modern_treasury/resources/payment_orders.rb', line 209 def update(id, params = {}) parsed, = ModernTreasury::PaymentOrderUpdateParams.dump_request(params) @client.request( method: :patch, path: ["api/payment_orders/%1$s", id], body: parsed, model: ModernTreasury::PaymentOrder, options: ) end |