Class: Lithic::Resources::ManagementOperations
- Inherits:
-
Object
- Object
- Lithic::Resources::ManagementOperations
- Defined in:
- lib/lithic/resources/management_operations.rb
Instance Method Summary collapse
-
#create(amount:, category:, direction:, effective_date:, event_type:, financial_account_token:, token: nil, memo: nil, on_closed_account: nil, subtype: nil, user_defined_id: nil, request_options: {}) ⇒ Lithic::Models::ManagementOperationTransaction
Create management operation.
-
#initialize(client:) ⇒ ManagementOperations
constructor
private
A new instance of ManagementOperations.
-
#list(begin_: nil, business_account_token: nil, category: nil, end_: nil, ending_before: nil, financial_account_token: nil, page_size: nil, starting_after: nil, status: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::ManagementOperationTransaction>
Some parameter documentations has been truncated, see Models::ManagementOperationListParams for more details.
-
#retrieve(management_operation_token, request_options: {}) ⇒ Lithic::Models::ManagementOperationTransaction
Get management operation.
-
#reverse(management_operation_token, effective_date:, memo: nil, request_options: {}) ⇒ Lithic::Models::ManagementOperationTransaction
Reverse a management operation.
Constructor Details
#initialize(client:) ⇒ ManagementOperations
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 ManagementOperations.
139 140 141 |
# File 'lib/lithic/resources/management_operations.rb', line 139 def initialize(client:) @client = client end |
Instance Method Details
#create(amount:, category:, direction:, effective_date:, event_type:, financial_account_token:, token: nil, memo: nil, on_closed_account: nil, subtype: nil, user_defined_id: nil, request_options: {}) ⇒ Lithic::Models::ManagementOperationTransaction
Create management operation
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/lithic/resources/management_operations.rb', line 37 def create(params) parsed, = Lithic::ManagementOperationCreateParams.dump_request(params) @client.request( method: :post, path: "v1/management_operations", body: parsed, model: Lithic::ManagementOperationTransaction, options: ) end |
#list(begin_: nil, business_account_token: nil, category: nil, end_: nil, ending_before: nil, financial_account_token: nil, page_size: nil, starting_after: nil, status: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::ManagementOperationTransaction>
Some parameter documentations has been truncated, see Models::ManagementOperationListParams for more details.
List management operations
98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/lithic/resources/management_operations.rb', line 98 def list(params = {}) parsed, = Lithic::ManagementOperationListParams.dump_request(params) @client.request( method: :get, path: "v1/management_operations", query: parsed.transform_keys(begin_: "begin", end_: "end"), page: Lithic::Internal::CursorPage, model: Lithic::ManagementOperationTransaction, options: ) end |
#retrieve(management_operation_token, request_options: {}) ⇒ Lithic::Models::ManagementOperationTransaction
Get management operation
59 60 61 62 63 64 65 66 |
# File 'lib/lithic/resources/management_operations.rb', line 59 def retrieve(management_operation_token, params = {}) @client.request( method: :get, path: ["v1/management_operations/%1$s", management_operation_token], model: Lithic::ManagementOperationTransaction, options: params[:request_options] ) end |
#reverse(management_operation_token, effective_date:, memo: nil, request_options: {}) ⇒ Lithic::Models::ManagementOperationTransaction
Reverse a management operation
125 126 127 128 129 130 131 132 133 134 |
# File 'lib/lithic/resources/management_operations.rb', line 125 def reverse(management_operation_token, params) parsed, = Lithic::ManagementOperationReverseParams.dump_request(params) @client.request( method: :post, path: ["v1/management_operations/%1$s/reverse", management_operation_token], body: parsed, model: Lithic::ManagementOperationTransaction, options: ) end |