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
Some parameter documentations has been truncated, see Models::ManagementOperationCreateParams for more details.
-
#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.
143 144 145 |
# File 'lib/lithic/resources/management_operations.rb', line 143 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
Some parameter documentations has been truncated, see Models::ManagementOperationCreateParams for more details.
Create management operation
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/lithic/resources/management_operations.rb', line 40 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
101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/lithic/resources/management_operations.rb', line 101 def list(params = {}) parsed, = Lithic::ManagementOperationListParams.dump_request(params) query = Lithic::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "v1/management_operations", query: query.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
62 63 64 65 66 67 68 69 |
# File 'lib/lithic/resources/management_operations.rb', line 62 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
129 130 131 132 133 134 135 136 137 138 |
# File 'lib/lithic/resources/management_operations.rb', line 129 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 |