merge_accounting_client 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +16 -0
- data/README.md +10 -5
- data/docs/Account.md +1 -1
- data/docs/AccountDetails.md +3 -1
- data/docs/AccountDetailsAndActions.md +2 -0
- data/docs/AccountingAttachment.md +1 -1
- data/docs/AccountsApi.md +7 -3
- data/docs/AddressesApi.md +3 -1
- data/docs/AttachmentsApi.md +2 -2
- data/docs/BalanceSheet.md +1 -1
- data/docs/BalanceSheetsApi.md +2 -2
- data/docs/CashFlowStatement.md +1 -1
- data/docs/CashFlowStatementsApi.md +2 -2
- data/docs/CompanyInfo.md +1 -1
- data/docs/CompanyInfoApi.md +2 -2
- data/docs/Contact.md +1 -1
- data/docs/ContactsApi.md +7 -3
- data/docs/CreditNote.md +7 -1
- data/docs/CreditNoteLineItem.md +38 -0
- data/docs/CreditNotesApi.md +7 -3
- data/docs/DataPassthroughRequest.md +3 -1
- data/docs/EndUserDetailsRequest.md +9 -7
- data/docs/Expense.md +1 -1
- data/docs/ExpensesApi.md +2 -2
- data/docs/IncomeStatement.md +1 -1
- data/docs/IncomeStatementsApi.md +2 -2
- data/docs/InvoiceLineItem.md +0 -2
- data/docs/InvoicesApi.md +8 -4
- data/docs/Item.md +1 -1
- data/docs/ItemsApi.md +7 -3
- data/docs/JournalEntriesApi.md +2 -2
- data/docs/LinkToken.md +3 -1
- data/docs/LinkedAccountsApi.md +2 -0
- data/docs/PaginatedTransactionList.md +22 -0
- data/docs/Payment.md +1 -1
- data/docs/PaymentsApi.md +2 -2
- data/docs/PurchaseOrder.md +8 -2
- data/docs/PurchaseOrderLineItem.md +9 -1
- data/docs/PurchaseOrdersApi.md +7 -3
- data/docs/RemoteResponse.md +2 -0
- data/docs/SyncStatusApi.md +1 -1
- data/docs/TaxRate.md +1 -1
- data/docs/TaxRatesApi.md +2 -2
- data/docs/TrackingCategoriesApi.md +7 -3
- data/docs/TrackingCategory.md +1 -1
- data/docs/Transaction.md +40 -0
- data/docs/TransactionLineItem.md +34 -0
- data/docs/TransactionsApi.md +181 -0
- data/docs/VendorCredit.md +1 -1
- data/docs/VendorCreditsApi.md +2 -2
- data/lib/merge_accounting_client/api/accounts_api.rb +16 -2
- data/lib/merge_accounting_client/api/addresses_api.rb +7 -0
- data/lib/merge_accounting_client/api/attachments_api.rb +2 -2
- data/lib/merge_accounting_client/api/balance_sheets_api.rb +2 -2
- data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +2 -2
- data/lib/merge_accounting_client/api/company_info_api.rb +2 -2
- data/lib/merge_accounting_client/api/contacts_api.rb +16 -2
- data/lib/merge_accounting_client/api/credit_notes_api.rb +16 -2
- data/lib/merge_accounting_client/api/expenses_api.rb +2 -2
- data/lib/merge_accounting_client/api/income_statements_api.rb +2 -2
- data/lib/merge_accounting_client/api/invoices_api.rb +17 -3
- data/lib/merge_accounting_client/api/items_api.rb +16 -2
- data/lib/merge_accounting_client/api/journal_entries_api.rb +2 -2
- data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -0
- data/lib/merge_accounting_client/api/payments_api.rb +2 -2
- data/lib/merge_accounting_client/api/purchase_orders_api.rb +16 -2
- data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
- data/lib/merge_accounting_client/api/tax_rates_api.rb +2 -2
- data/lib/merge_accounting_client/api/tracking_categories_api.rb +16 -2
- data/lib/merge_accounting_client/api/transactions_api.rb +196 -0
- data/lib/merge_accounting_client/api/vendor_credits_api.rb +2 -2
- data/lib/merge_accounting_client/models/account.rb +1 -1
- data/lib/merge_accounting_client/models/account_details.rb +15 -4
- data/lib/merge_accounting_client/models/account_details_and_actions.rb +12 -1
- data/lib/merge_accounting_client/models/account_details_and_actions_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/account_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/accounting_attachment.rb +1 -1
- data/lib/merge_accounting_client/models/address_type_enum.rb +17 -7
- data/lib/merge_accounting_client/models/balance_sheet.rb +1 -1
- data/lib/merge_accounting_client/models/cash_flow_statement.rb +1 -1
- data/lib/merge_accounting_client/models/categories_enum.rb +17 -7
- data/lib/merge_accounting_client/models/category_enum.rb +17 -7
- data/lib/merge_accounting_client/models/classification_enum.rb +17 -7
- data/lib/merge_accounting_client/models/company_info.rb +1 -1
- data/lib/merge_accounting_client/models/contact.rb +1 -1
- data/lib/merge_accounting_client/models/country_enum.rb +17 -7
- data/lib/merge_accounting_client/models/credit_note.rb +35 -2
- data/lib/merge_accounting_client/models/credit_note_line_item.rb +380 -0
- data/lib/merge_accounting_client/models/credit_note_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/currency_enum.rb +17 -7
- data/lib/merge_accounting_client/models/data_passthrough_request.rb +14 -5
- data/lib/merge_accounting_client/models/encoding_enum.rb +18 -7
- data/lib/merge_accounting_client/models/end_user_details_request.rb +28 -11
- data/lib/merge_accounting_client/models/expense.rb +1 -1
- data/lib/merge_accounting_client/models/income_statement.rb +1 -1
- data/lib/merge_accounting_client/models/invoice_line_item.rb +1 -13
- data/lib/merge_accounting_client/models/invoice_type_enum.rb +17 -7
- data/lib/merge_accounting_client/models/issue_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/item.rb +1 -1
- data/lib/merge_accounting_client/models/link_token.rb +13 -4
- data/lib/merge_accounting_client/models/method_enum.rb +17 -7
- data/lib/merge_accounting_client/models/paginated_transaction_list.rb +240 -0
- data/lib/merge_accounting_client/models/payment.rb +1 -1
- data/lib/merge_accounting_client/models/purchase_order.rb +35 -2
- data/lib/merge_accounting_client/models/purchase_order_line_item.rb +83 -5
- data/lib/merge_accounting_client/models/purchase_order_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/remote_response.rb +13 -2
- data/lib/merge_accounting_client/models/request_format_enum.rb +17 -7
- data/lib/merge_accounting_client/models/state_enum.rb +17 -7
- data/lib/merge_accounting_client/models/status7d1_enum.rb +17 -7
- data/lib/merge_accounting_client/models/sync_status_status_enum.rb +18 -7
- data/lib/merge_accounting_client/models/tax_rate.rb +1 -1
- data/lib/merge_accounting_client/models/tracking_category.rb +1 -1
- data/lib/merge_accounting_client/models/transaction.rb +356 -0
- data/lib/merge_accounting_client/models/transaction_line_item.rb +358 -0
- data/lib/merge_accounting_client/models/vendor_credit.rb +1 -1
- data/lib/merge_accounting_client/version.rb +1 -1
- data/lib/merge_accounting_client.rb +5 -1
- data/merge_accounting_client.gemspec +1 -1
- data/spec/api/accounts_api_spec.rb +3 -1
- data/spec/api/addresses_api_spec.rb +1 -0
- data/spec/api/attachments_api_spec.rb +1 -1
- data/spec/api/balance_sheets_api_spec.rb +1 -1
- data/spec/api/cash_flow_statements_api_spec.rb +1 -1
- data/spec/api/company_info_api_spec.rb +1 -1
- data/spec/api/contacts_api_spec.rb +3 -1
- data/spec/api/credit_notes_api_spec.rb +3 -1
- data/spec/api/expenses_api_spec.rb +1 -1
- data/spec/api/income_statements_api_spec.rb +1 -1
- data/spec/api/invoices_api_spec.rb +3 -1
- data/spec/api/items_api_spec.rb +3 -1
- data/spec/api/journal_entries_api_spec.rb +1 -1
- data/spec/api/linked_accounts_api_spec.rb +1 -0
- data/spec/api/payments_api_spec.rb +1 -1
- data/spec/api/purchase_orders_api_spec.rb +3 -1
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/api/tax_rates_api_spec.rb +1 -1
- data/spec/api/tracking_categories_api_spec.rb +3 -1
- data/spec/api/transactions_api_spec.rb +70 -0
- data/spec/api/vendor_credits_api_spec.rb +1 -1
- data/spec/models/account_details_and_actions_spec.rb +6 -0
- data/spec/models/account_details_spec.rb +6 -0
- data/spec/models/credit_note_line_item_spec.rb +94 -0
- data/spec/models/credit_note_spec.rb +18 -0
- data/spec/models/data_passthrough_request_spec.rb +6 -0
- data/spec/models/end_user_details_request_spec.rb +6 -0
- data/spec/models/invoice_line_item_spec.rb +0 -6
- data/spec/models/link_token_spec.rb +6 -0
- data/spec/models/paginated_transaction_list_spec.rb +46 -0
- data/spec/models/purchase_order_line_item_spec.rb +24 -0
- data/spec/models/purchase_order_spec.rb +18 -0
- data/spec/models/remote_response_spec.rb +6 -0
- data/spec/models/transaction_line_item_spec.rb +82 -0
- data/spec/models/transaction_spec.rb +100 -0
- metadata +132 -111
@@ -103,11 +103,12 @@ module MergeAccountingClient
|
|
103
103
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
104
104
|
# @option opts [String] :cursor The pagination cursor value.
|
105
105
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
106
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
106
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
107
107
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
108
108
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
109
109
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
110
110
|
# @option opts [Integer] :page_size Number of results to return per page.
|
111
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
111
112
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
112
113
|
# @option opts [String] :type If provided, will only return Invoices with this type
|
113
114
|
# @return [PaginatedInvoiceList]
|
@@ -124,11 +125,12 @@ module MergeAccountingClient
|
|
124
125
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
125
126
|
# @option opts [String] :cursor The pagination cursor value.
|
126
127
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
127
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
128
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
128
129
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
129
130
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
130
131
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
131
132
|
# @option opts [Integer] :page_size Number of results to return per page.
|
133
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
132
134
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
133
135
|
# @option opts [String] :type If provided, will only return Invoices with this type
|
134
136
|
# @return [Array<(PaginatedInvoiceList, Integer, Hash)>] PaginatedInvoiceList data, response status code and response headers
|
@@ -144,7 +146,11 @@ module MergeAccountingClient
|
|
144
146
|
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
145
147
|
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
146
148
|
end
|
147
|
-
allowable_values = [""
|
149
|
+
allowable_values = ["type"]
|
150
|
+
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
151
|
+
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
152
|
+
end
|
153
|
+
allowable_values = ["ACCOUNTS_PAYABLE", "ACCOUNTS_RECEIVABLE"]
|
148
154
|
if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
|
149
155
|
fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
|
150
156
|
end
|
@@ -163,6 +169,7 @@ module MergeAccountingClient
|
|
163
169
|
query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
|
164
170
|
query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
|
165
171
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
172
|
+
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
166
173
|
query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
|
167
174
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
168
175
|
|
@@ -269,6 +276,7 @@ module MergeAccountingClient
|
|
269
276
|
# @param [Hash] opts the optional parameters
|
270
277
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
271
278
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
279
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
272
280
|
# @return [Invoice]
|
273
281
|
def invoices_retrieve(x_account_token, id, opts = {})
|
274
282
|
data, _status_code, _headers = invoices_retrieve_with_http_info(x_account_token, id, opts)
|
@@ -281,6 +289,7 @@ module MergeAccountingClient
|
|
281
289
|
# @param [Hash] opts the optional parameters
|
282
290
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
283
291
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
292
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
284
293
|
# @return [Array<(Invoice, Integer, Hash)>] Invoice data, response status code and response headers
|
285
294
|
def invoices_retrieve_with_http_info(x_account_token, id, opts = {})
|
286
295
|
if @api_client.config.debugging
|
@@ -298,6 +307,10 @@ module MergeAccountingClient
|
|
298
307
|
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
299
308
|
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
300
309
|
end
|
310
|
+
allowable_values = ["type"]
|
311
|
+
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
312
|
+
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
313
|
+
end
|
301
314
|
# resource path
|
302
315
|
local_var_path = '/invoices/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
303
316
|
|
@@ -305,6 +318,7 @@ module MergeAccountingClient
|
|
305
318
|
query_params = opts[:query_params] || {}
|
306
319
|
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
307
320
|
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
321
|
+
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
308
322
|
|
309
323
|
# header parameters
|
310
324
|
header_params = opts[:header_params] || {}
|
@@ -26,11 +26,12 @@ module MergeAccountingClient
|
|
26
26
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
27
|
# @option opts [String] :cursor The pagination cursor value.
|
28
28
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
29
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
29
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
30
30
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
31
31
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
32
32
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
33
33
|
# @option opts [Integer] :page_size Number of results to return per page.
|
34
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
34
35
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
35
36
|
# @return [PaginatedItemList]
|
36
37
|
def items_list(x_account_token, opts = {})
|
@@ -45,11 +46,12 @@ module MergeAccountingClient
|
|
45
46
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
46
47
|
# @option opts [String] :cursor The pagination cursor value.
|
47
48
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
48
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
49
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
49
50
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
50
51
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
51
52
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
52
53
|
# @option opts [Integer] :page_size Number of results to return per page.
|
54
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
53
55
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
54
56
|
# @return [Array<(PaginatedItemList, Integer, Hash)>] PaginatedItemList data, response status code and response headers
|
55
57
|
def items_list_with_http_info(x_account_token, opts = {})
|
@@ -64,6 +66,10 @@ module MergeAccountingClient
|
|
64
66
|
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
65
67
|
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
66
68
|
end
|
69
|
+
allowable_values = ["status"]
|
70
|
+
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
71
|
+
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
72
|
+
end
|
67
73
|
# resource path
|
68
74
|
local_var_path = '/items'
|
69
75
|
|
@@ -78,6 +84,7 @@ module MergeAccountingClient
|
|
78
84
|
query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
|
79
85
|
query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
|
80
86
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
87
|
+
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
81
88
|
query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
|
82
89
|
|
83
90
|
# header parameters
|
@@ -121,6 +128,7 @@ module MergeAccountingClient
|
|
121
128
|
# @param [Hash] opts the optional parameters
|
122
129
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
123
130
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
131
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
124
132
|
# @return [Item]
|
125
133
|
def items_retrieve(x_account_token, id, opts = {})
|
126
134
|
data, _status_code, _headers = items_retrieve_with_http_info(x_account_token, id, opts)
|
@@ -133,6 +141,7 @@ module MergeAccountingClient
|
|
133
141
|
# @param [Hash] opts the optional parameters
|
134
142
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
135
143
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
144
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
136
145
|
# @return [Array<(Item, Integer, Hash)>] Item data, response status code and response headers
|
137
146
|
def items_retrieve_with_http_info(x_account_token, id, opts = {})
|
138
147
|
if @api_client.config.debugging
|
@@ -150,6 +159,10 @@ module MergeAccountingClient
|
|
150
159
|
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
151
160
|
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
152
161
|
end
|
162
|
+
allowable_values = ["status"]
|
163
|
+
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
164
|
+
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
165
|
+
end
|
153
166
|
# resource path
|
154
167
|
local_var_path = '/items/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
155
168
|
|
@@ -157,6 +170,7 @@ module MergeAccountingClient
|
|
157
170
|
query_params = opts[:query_params] || {}
|
158
171
|
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
159
172
|
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
173
|
+
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
160
174
|
|
161
175
|
# header parameters
|
162
176
|
header_params = opts[:header_params] || {}
|
@@ -102,7 +102,7 @@ module MergeAccountingClient
|
|
102
102
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
103
103
|
# @option opts [String] :cursor The pagination cursor value.
|
104
104
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
105
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
105
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
106
106
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
107
107
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
108
108
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
@@ -121,7 +121,7 @@ module MergeAccountingClient
|
|
121
121
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
122
122
|
# @option opts [String] :cursor The pagination cursor value.
|
123
123
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
124
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
124
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
125
125
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
126
126
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
127
127
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
@@ -29,6 +29,7 @@ module MergeAccountingClient
|
|
29
29
|
# @option opts [String] :end_user_origin_ids Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
|
30
30
|
# @option opts [String] :id
|
31
31
|
# @option opts [String] :ids Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
|
32
|
+
# @option opts [Boolean] :include_duplicates If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
|
32
33
|
# @option opts [String] :integration_name If provided, will only return linked accounts associated with the given integration name.
|
33
34
|
# @option opts [String] :is_test_account If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
|
34
35
|
# @option opts [Integer] :page_size Number of results to return per page.
|
@@ -49,6 +50,7 @@ module MergeAccountingClient
|
|
49
50
|
# @option opts [String] :end_user_origin_ids Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
|
50
51
|
# @option opts [String] :id
|
51
52
|
# @option opts [String] :ids Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
|
53
|
+
# @option opts [Boolean] :include_duplicates If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
|
52
54
|
# @option opts [String] :integration_name If provided, will only return linked accounts associated with the given integration name.
|
53
55
|
# @option opts [String] :is_test_account If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
|
54
56
|
# @option opts [Integer] :page_size Number of results to return per page.
|
@@ -75,6 +77,7 @@ module MergeAccountingClient
|
|
75
77
|
query_params[:'end_user_origin_ids'] = opts[:'end_user_origin_ids'] if !opts[:'end_user_origin_ids'].nil?
|
76
78
|
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
77
79
|
query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
|
80
|
+
query_params[:'include_duplicates'] = opts[:'include_duplicates'] if !opts[:'include_duplicates'].nil?
|
78
81
|
query_params[:'integration_name'] = opts[:'integration_name'] if !opts[:'integration_name'].nil?
|
79
82
|
query_params[:'is_test_account'] = opts[:'is_test_account'] if !opts[:'is_test_account'].nil?
|
80
83
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
@@ -28,7 +28,7 @@ module MergeAccountingClient
|
|
28
28
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
29
29
|
# @option opts [String] :cursor The pagination cursor value.
|
30
30
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
31
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
31
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
32
32
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
33
33
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
34
34
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
@@ -49,7 +49,7 @@ module MergeAccountingClient
|
|
49
49
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
50
50
|
# @option opts [String] :cursor The pagination cursor value.
|
51
51
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
52
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
52
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
53
53
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
54
54
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
55
55
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
@@ -26,11 +26,12 @@ module MergeAccountingClient
|
|
26
26
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
27
|
# @option opts [String] :cursor The pagination cursor value.
|
28
28
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
29
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
29
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
30
30
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
31
31
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
32
32
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
33
33
|
# @option opts [Integer] :page_size Number of results to return per page.
|
34
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
34
35
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
35
36
|
# @return [PaginatedPurchaseOrderList]
|
36
37
|
def purchase_orders_list(x_account_token, opts = {})
|
@@ -45,11 +46,12 @@ module MergeAccountingClient
|
|
45
46
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
46
47
|
# @option opts [String] :cursor The pagination cursor value.
|
47
48
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
48
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
49
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
49
50
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
50
51
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
51
52
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
52
53
|
# @option opts [Integer] :page_size Number of results to return per page.
|
54
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
53
55
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
54
56
|
# @return [Array<(PaginatedPurchaseOrderList, Integer, Hash)>] PaginatedPurchaseOrderList data, response status code and response headers
|
55
57
|
def purchase_orders_list_with_http_info(x_account_token, opts = {})
|
@@ -64,6 +66,10 @@ module MergeAccountingClient
|
|
64
66
|
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
65
67
|
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
66
68
|
end
|
69
|
+
allowable_values = ["status"]
|
70
|
+
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
71
|
+
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
72
|
+
end
|
67
73
|
# resource path
|
68
74
|
local_var_path = '/purchase-orders'
|
69
75
|
|
@@ -78,6 +84,7 @@ module MergeAccountingClient
|
|
78
84
|
query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
|
79
85
|
query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
|
80
86
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
87
|
+
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
81
88
|
query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
|
82
89
|
|
83
90
|
# header parameters
|
@@ -121,6 +128,7 @@ module MergeAccountingClient
|
|
121
128
|
# @param [Hash] opts the optional parameters
|
122
129
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
123
130
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
131
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
124
132
|
# @return [PurchaseOrder]
|
125
133
|
def purchase_orders_retrieve(x_account_token, id, opts = {})
|
126
134
|
data, _status_code, _headers = purchase_orders_retrieve_with_http_info(x_account_token, id, opts)
|
@@ -133,6 +141,7 @@ module MergeAccountingClient
|
|
133
141
|
# @param [Hash] opts the optional parameters
|
134
142
|
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
135
143
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
144
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
136
145
|
# @return [Array<(PurchaseOrder, Integer, Hash)>] PurchaseOrder data, response status code and response headers
|
137
146
|
def purchase_orders_retrieve_with_http_info(x_account_token, id, opts = {})
|
138
147
|
if @api_client.config.debugging
|
@@ -150,6 +159,10 @@ module MergeAccountingClient
|
|
150
159
|
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
151
160
|
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
152
161
|
end
|
162
|
+
allowable_values = ["status"]
|
163
|
+
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
164
|
+
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
165
|
+
end
|
153
166
|
# resource path
|
154
167
|
local_var_path = '/purchase-orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
155
168
|
|
@@ -157,6 +170,7 @@ module MergeAccountingClient
|
|
157
170
|
query_params = opts[:query_params] || {}
|
158
171
|
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
159
172
|
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
173
|
+
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
160
174
|
|
161
175
|
# header parameters
|
162
176
|
header_params = opts[:header_params] || {}
|
@@ -19,7 +19,7 @@ module MergeAccountingClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `SYNCING`
|
22
|
+
# Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PAUSED`, `SYNCING`
|
23
23
|
# @param x_account_token [String] Token identifying the end user.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -30,7 +30,7 @@ module MergeAccountingClient
|
|
30
30
|
data
|
31
31
|
end
|
32
32
|
|
33
|
-
# Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `SYNCING`
|
33
|
+
# Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PAUSED`, `SYNCING`
|
34
34
|
# @param x_account_token [String] Token identifying the end user.
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
36
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -25,7 +25,7 @@ module MergeAccountingClient
|
|
25
25
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
26
26
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
27
|
# @option opts [String] :cursor The pagination cursor value.
|
28
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
28
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
29
29
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
30
30
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
31
31
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
@@ -43,7 +43,7 @@ module MergeAccountingClient
|
|
43
43
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
44
44
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
45
45
|
# @option opts [String] :cursor The pagination cursor value.
|
46
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
46
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
47
47
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
48
48
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
49
49
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
@@ -25,11 +25,12 @@ module MergeAccountingClient
|
|
25
25
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
26
26
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
27
|
# @option opts [String] :cursor The pagination cursor value.
|
28
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
28
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
29
29
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
30
30
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
31
31
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
32
32
|
# @option opts [Integer] :page_size Number of results to return per page.
|
33
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
33
34
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
34
35
|
# @return [PaginatedTrackingCategoryList]
|
35
36
|
def tracking_categories_list(x_account_token, opts = {})
|
@@ -43,11 +44,12 @@ module MergeAccountingClient
|
|
43
44
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
44
45
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
45
46
|
# @option opts [String] :cursor The pagination cursor value.
|
46
|
-
# @option opts [Boolean] :include_deleted_data Whether to include data that was deleted
|
47
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
47
48
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
48
49
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
49
50
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
50
51
|
# @option opts [Integer] :page_size Number of results to return per page.
|
52
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
51
53
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
52
54
|
# @return [Array<(PaginatedTrackingCategoryList, Integer, Hash)>] PaginatedTrackingCategoryList data, response status code and response headers
|
53
55
|
def tracking_categories_list_with_http_info(x_account_token, opts = {})
|
@@ -58,6 +60,10 @@ module MergeAccountingClient
|
|
58
60
|
if @api_client.config.client_side_validation && x_account_token.nil?
|
59
61
|
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TrackingCategoriesApi.tracking_categories_list"
|
60
62
|
end
|
63
|
+
allowable_values = ["status"]
|
64
|
+
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
65
|
+
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
66
|
+
end
|
61
67
|
# resource path
|
62
68
|
local_var_path = '/tracking-categories'
|
63
69
|
|
@@ -71,6 +77,7 @@ module MergeAccountingClient
|
|
71
77
|
query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
|
72
78
|
query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
|
73
79
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
80
|
+
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
74
81
|
query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
|
75
82
|
|
76
83
|
# header parameters
|
@@ -113,6 +120,7 @@ module MergeAccountingClient
|
|
113
120
|
# @param id [String]
|
114
121
|
# @param [Hash] opts the optional parameters
|
115
122
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
123
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
116
124
|
# @return [TrackingCategory]
|
117
125
|
def tracking_categories_retrieve(x_account_token, id, opts = {})
|
118
126
|
data, _status_code, _headers = tracking_categories_retrieve_with_http_info(x_account_token, id, opts)
|
@@ -124,6 +132,7 @@ module MergeAccountingClient
|
|
124
132
|
# @param id [String]
|
125
133
|
# @param [Hash] opts the optional parameters
|
126
134
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
135
|
+
# @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
|
127
136
|
# @return [Array<(TrackingCategory, Integer, Hash)>] TrackingCategory data, response status code and response headers
|
128
137
|
def tracking_categories_retrieve_with_http_info(x_account_token, id, opts = {})
|
129
138
|
if @api_client.config.debugging
|
@@ -137,12 +146,17 @@ module MergeAccountingClient
|
|
137
146
|
if @api_client.config.client_side_validation && id.nil?
|
138
147
|
fail ArgumentError, "Missing the required parameter 'id' when calling TrackingCategoriesApi.tracking_categories_retrieve"
|
139
148
|
end
|
149
|
+
allowable_values = ["status"]
|
150
|
+
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
151
|
+
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
152
|
+
end
|
140
153
|
# resource path
|
141
154
|
local_var_path = '/tracking-categories/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
142
155
|
|
143
156
|
# query parameters
|
144
157
|
query_params = opts[:query_params] || {}
|
145
158
|
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
159
|
+
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
146
160
|
|
147
161
|
# header parameters
|
148
162
|
header_params = opts[:header_params] || {}
|
@@ -0,0 +1,196 @@
|
|
1
|
+
=begin
|
2
|
+
#Merge Accounting API
|
3
|
+
|
4
|
+
#The unified API for building rich integrations with multiple Accounting & Finance platforms.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: hello@merge.dev
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module MergeAccountingClient
|
16
|
+
class TransactionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Returns a list of `Transaction` objects.
|
23
|
+
# @param x_account_token [String] Token identifying the end user.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
26
|
+
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
|
+
# @option opts [String] :cursor The pagination cursor value.
|
28
|
+
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
29
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
30
|
+
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
31
|
+
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
32
|
+
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
33
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
34
|
+
# @option opts [String] :remote_id The API provider's ID for the given object.
|
35
|
+
# @return [PaginatedTransactionList]
|
36
|
+
def transactions_list(x_account_token, opts = {})
|
37
|
+
data, _status_code, _headers = transactions_list_with_http_info(x_account_token, opts)
|
38
|
+
data
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns a list of `Transaction` objects.
|
42
|
+
# @param x_account_token [String] Token identifying the end user.
|
43
|
+
# @param [Hash] opts the optional parameters
|
44
|
+
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
45
|
+
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
46
|
+
# @option opts [String] :cursor The pagination cursor value.
|
47
|
+
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
48
|
+
# @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
|
49
|
+
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
50
|
+
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
51
|
+
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
52
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
53
|
+
# @option opts [String] :remote_id The API provider's ID for the given object.
|
54
|
+
# @return [Array<(PaginatedTransactionList, Integer, Hash)>] PaginatedTransactionList data, response status code and response headers
|
55
|
+
def transactions_list_with_http_info(x_account_token, opts = {})
|
56
|
+
if @api_client.config.debugging
|
57
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.transactions_list ...'
|
58
|
+
end
|
59
|
+
# verify the required parameter 'x_account_token' is set
|
60
|
+
if @api_client.config.client_side_validation && x_account_token.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TransactionsApi.transactions_list"
|
62
|
+
end
|
63
|
+
allowable_values = ["line_items"]
|
64
|
+
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
65
|
+
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
66
|
+
end
|
67
|
+
# resource path
|
68
|
+
local_var_path = '/transactions'
|
69
|
+
|
70
|
+
# query parameters
|
71
|
+
query_params = opts[:query_params] || {}
|
72
|
+
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
73
|
+
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
74
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
75
|
+
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
76
|
+
query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
|
77
|
+
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
78
|
+
query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
|
79
|
+
query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
|
80
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
81
|
+
query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
|
82
|
+
|
83
|
+
# header parameters
|
84
|
+
header_params = opts[:header_params] || {}
|
85
|
+
# HTTP header 'Accept' (if needed)
|
86
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
87
|
+
header_params[:'X-Account-Token'] = x_account_token
|
88
|
+
|
89
|
+
# form parameters
|
90
|
+
form_params = opts[:form_params] || {}
|
91
|
+
|
92
|
+
# http body (model)
|
93
|
+
post_body = opts[:debug_body]
|
94
|
+
|
95
|
+
# return_type
|
96
|
+
return_type = opts[:debug_return_type] || 'PaginatedTransactionList'
|
97
|
+
|
98
|
+
# auth_names
|
99
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
100
|
+
|
101
|
+
new_options = opts.merge(
|
102
|
+
:operation => :"TransactionsApi.transactions_list",
|
103
|
+
:header_params => header_params,
|
104
|
+
:query_params => query_params,
|
105
|
+
:form_params => form_params,
|
106
|
+
:body => post_body,
|
107
|
+
:auth_names => auth_names,
|
108
|
+
:return_type => return_type
|
109
|
+
)
|
110
|
+
|
111
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug "API called: TransactionsApi#transactions_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
114
|
+
end
|
115
|
+
return data, status_code, headers
|
116
|
+
end
|
117
|
+
|
118
|
+
# Returns a `Transaction` object with the given `id`.
|
119
|
+
# @param x_account_token [String] Token identifying the end user.
|
120
|
+
# @param id [String]
|
121
|
+
# @param [Hash] opts the optional parameters
|
122
|
+
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
123
|
+
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
124
|
+
# @return [Transaction]
|
125
|
+
def transactions_retrieve(x_account_token, id, opts = {})
|
126
|
+
data, _status_code, _headers = transactions_retrieve_with_http_info(x_account_token, id, opts)
|
127
|
+
data
|
128
|
+
end
|
129
|
+
|
130
|
+
# Returns a `Transaction` object with the given `id`.
|
131
|
+
# @param x_account_token [String] Token identifying the end user.
|
132
|
+
# @param id [String]
|
133
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
135
|
+
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
136
|
+
# @return [Array<(Transaction, Integer, Hash)>] Transaction data, response status code and response headers
|
137
|
+
def transactions_retrieve_with_http_info(x_account_token, id, opts = {})
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.transactions_retrieve ...'
|
140
|
+
end
|
141
|
+
# verify the required parameter 'x_account_token' is set
|
142
|
+
if @api_client.config.client_side_validation && x_account_token.nil?
|
143
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TransactionsApi.transactions_retrieve"
|
144
|
+
end
|
145
|
+
# verify the required parameter 'id' is set
|
146
|
+
if @api_client.config.client_side_validation && id.nil?
|
147
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.transactions_retrieve"
|
148
|
+
end
|
149
|
+
allowable_values = ["line_items"]
|
150
|
+
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
151
|
+
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
152
|
+
end
|
153
|
+
# resource path
|
154
|
+
local_var_path = '/transactions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = opts[:query_params] || {}
|
158
|
+
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
159
|
+
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
160
|
+
|
161
|
+
# header parameters
|
162
|
+
header_params = opts[:header_params] || {}
|
163
|
+
# HTTP header 'Accept' (if needed)
|
164
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
165
|
+
header_params[:'X-Account-Token'] = x_account_token
|
166
|
+
|
167
|
+
# form parameters
|
168
|
+
form_params = opts[:form_params] || {}
|
169
|
+
|
170
|
+
# http body (model)
|
171
|
+
post_body = opts[:debug_body]
|
172
|
+
|
173
|
+
# return_type
|
174
|
+
return_type = opts[:debug_return_type] || 'Transaction'
|
175
|
+
|
176
|
+
# auth_names
|
177
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
178
|
+
|
179
|
+
new_options = opts.merge(
|
180
|
+
:operation => :"TransactionsApi.transactions_retrieve",
|
181
|
+
:header_params => header_params,
|
182
|
+
:query_params => query_params,
|
183
|
+
:form_params => form_params,
|
184
|
+
:body => post_body,
|
185
|
+
:auth_names => auth_names,
|
186
|
+
:return_type => return_type
|
187
|
+
)
|
188
|
+
|
189
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
190
|
+
if @api_client.config.debugging
|
191
|
+
@api_client.config.logger.debug "API called: TransactionsApi#transactions_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
192
|
+
end
|
193
|
+
return data, status_code, headers
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|