merge_accounting_client 1.0.3 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +61 -5
- data/docs/Account.md +12 -8
- data/docs/AccountEndpointRequest.md +18 -0
- data/docs/AccountIntegration.md +1 -1
- data/docs/AccountRequest.md +40 -0
- data/docs/AccountResponse.md +24 -0
- data/docs/AccountingAttachment.md +7 -3
- data/docs/AccountingAttachmentEndpointRequest.md +18 -0
- data/docs/AccountingAttachmentRequest.md +26 -0
- data/docs/AccountingAttachmentResponse.md +24 -0
- data/docs/AccountingPhoneNumberRequest.md +24 -0
- data/docs/AccountsApi.md +163 -5
- data/docs/Address.md +5 -3
- data/docs/AddressesApi.md +4 -2
- data/docs/AttachmentsApi.md +154 -0
- data/docs/BalanceSheet.md +11 -7
- data/docs/BalanceSheetsApi.md +2 -0
- data/docs/CashFlowStatement.md +11 -7
- data/docs/CashFlowStatementsApi.md +2 -0
- data/docs/CommonModelScopeData.md +20 -0
- data/docs/CommonModelScopes.md +20 -0
- data/docs/CommonModelScopesApi.md +157 -0
- data/docs/CommonModelScopesBodyRequest.md +22 -0
- data/docs/CommonModelScopesDisabledModels.md +26 -0
- data/docs/CommonModelScopesDisabledModelsEnabledActionsEnum.md +15 -0
- data/docs/CommonModelScopesPostInnerDeserializerRequest.md +22 -0
- data/docs/CommonModelScopesUpdateSerializer.md +18 -0
- data/docs/CompanyInfo.md +6 -4
- data/docs/CompanyInfoApi.md +0 -4
- data/docs/ConditionSchema.md +30 -0
- data/docs/ConditionTypeEnum.md +15 -0
- data/docs/Contact.md +8 -4
- data/docs/ContactEndpointRequest.md +18 -0
- data/docs/ContactRequest.md +40 -0
- data/docs/ContactResponse.md +24 -0
- data/docs/ContactsApi.md +163 -9
- data/docs/CreditNote.md +12 -8
- data/docs/CreditNoteLineItem.md +7 -3
- data/docs/CreditNotesApi.md +15 -9
- data/docs/DataPassthroughRequest.md +1 -1
- data/docs/EnabledActionsEnum.md +15 -0
- data/docs/EndUserDetailsRequest.md +5 -3
- data/docs/Expense.md +18 -12
- data/docs/ExpenseEndpointRequest.md +18 -0
- data/docs/ExpenseLine.md +11 -5
- data/docs/ExpenseLineRequest.md +38 -0
- data/docs/ExpenseRequest.md +38 -0
- data/docs/ExpenseResponse.md +24 -0
- data/docs/ExpensesApi.md +159 -5
- data/docs/IncomeStatement.md +15 -11
- data/docs/IncomeStatementsApi.md +2 -0
- data/docs/Invoice.md +21 -15
- data/docs/InvoiceLineItem.md +15 -5
- data/docs/InvoiceLineItemRequest.md +15 -3
- data/docs/InvoiceRequest.md +17 -11
- data/docs/InvoicesApi.md +16 -10
- data/docs/Issue.md +9 -7
- data/docs/IssuesApi.md +2 -2
- data/docs/Item.md +11 -7
- data/docs/ItemsApi.md +11 -9
- data/docs/JournalEntriesApi.md +7 -5
- data/docs/JournalEntry.md +18 -10
- data/docs/JournalEntryRequest.md +14 -8
- data/docs/JournalLine.md +6 -4
- data/docs/JournalLineRequest.md +10 -4
- data/docs/LinkToken.md +1 -1
- data/docs/LinkedAccountCondition.md +28 -0
- data/docs/LinkedAccountConditionRequest.md +22 -0
- data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
- data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
- data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
- data/docs/LinkedAccountsApi.md +2 -2
- data/docs/MetaResponse.md +2 -0
- data/docs/MultipartFormFieldRequest.md +1 -1
- data/docs/OperatorSchema.md +20 -0
- data/docs/PaginatedConditionSchemaList.md +22 -0
- data/docs/Payment.md +14 -6
- data/docs/PaymentEndpointRequest.md +18 -0
- data/docs/PaymentRequest.md +34 -0
- data/docs/PaymentResponse.md +24 -0
- data/docs/PaymentsApi.md +159 -5
- data/docs/PostingStatusEnum.md +15 -0
- data/docs/PurchaseOrder.md +19 -13
- data/docs/PurchaseOrderEndpointRequest.md +18 -0
- data/docs/PurchaseOrderLineItem.md +10 -2
- data/docs/PurchaseOrderLineItemRequest.md +44 -0
- data/docs/PurchaseOrderRequest.md +44 -0
- data/docs/PurchaseOrderResponse.md +24 -0
- data/docs/PurchaseOrdersApi.md +167 -9
- data/docs/RemoteDataRequest.md +1 -1
- data/docs/ReportItem.md +3 -1
- data/docs/SelectiveSyncApi.md +233 -0
- data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
- data/docs/SyncStatus.md +5 -3
- data/docs/TaxRate.md +11 -7
- data/docs/TaxRatesApi.md +2 -0
- data/docs/TrackingCategoriesApi.md +11 -5
- data/docs/TrackingCategory.md +14 -8
- data/docs/Transaction.md +20 -14
- data/docs/TransactionLineItem.md +9 -3
- data/docs/TransactionsApi.md +7 -5
- data/docs/VendorCredit.md +13 -7
- data/docs/VendorCreditLine.md +6 -2
- data/docs/VendorCreditsApi.md +7 -5
- data/lib/merge_accounting_client/api/accounts_api.rb +159 -4
- data/lib/merge_accounting_client/api/addresses_api.rb +9 -2
- data/lib/merge_accounting_client/api/attachments_api.rb +141 -0
- data/lib/merge_accounting_client/api/balance_sheets_api.rb +3 -0
- data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +3 -0
- data/lib/merge_accounting_client/api/common_model_scopes_api.rb +146 -0
- data/lib/merge_accounting_client/api/company_info_api.rb +0 -14
- data/lib/merge_accounting_client/api/contacts_api.rb +159 -18
- data/lib/merge_accounting_client/api/credit_notes_api.rb +27 -18
- data/lib/merge_accounting_client/api/expenses_api.rb +147 -14
- data/lib/merge_accounting_client/api/income_statements_api.rb +3 -0
- data/lib/merge_accounting_client/api/invoices_api.rb +29 -20
- data/lib/merge_accounting_client/api/issues_api.rb +2 -2
- data/lib/merge_accounting_client/api/items_api.rb +21 -18
- data/lib/merge_accounting_client/api/journal_entries_api.rb +9 -14
- data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -3
- data/lib/merge_accounting_client/api/payments_api.rb +147 -14
- data/lib/merge_accounting_client/api/purchase_orders_api.rb +165 -18
- data/lib/merge_accounting_client/api/selective_sync_api.rb +225 -0
- data/lib/merge_accounting_client/api/tax_rates_api.rb +3 -0
- data/lib/merge_accounting_client/api/tracking_categories_api.rb +21 -4
- data/lib/merge_accounting_client/api/transactions_api.rb +9 -14
- data/lib/merge_accounting_client/api/vendor_credits_api.rb +9 -14
- data/lib/merge_accounting_client/api_client.rb +0 -3
- data/lib/merge_accounting_client/models/account.rb +45 -21
- data/lib/merge_accounting_client/models/account_details_and_actions_status_enum.rb +1 -1
- data/lib/merge_accounting_client/models/account_endpoint_request.rb +223 -0
- data/lib/merge_accounting_client/models/account_integration.rb +1 -1
- data/lib/merge_accounting_client/models/account_request.rb +344 -0
- data/lib/merge_accounting_client/models/account_response.rb +266 -0
- data/lib/merge_accounting_client/models/account_status_enum.rb +1 -1
- data/lib/merge_accounting_client/models/accounting_attachment.rb +39 -16
- data/lib/merge_accounting_client/models/accounting_attachment_endpoint_request.rb +223 -0
- data/lib/merge_accounting_client/models/accounting_attachment_request.rb +282 -0
- data/lib/merge_accounting_client/models/accounting_attachment_response.rb +266 -0
- data/lib/merge_accounting_client/models/accounting_phone_number_request.rb +256 -0
- data/lib/merge_accounting_client/models/address.rb +16 -5
- data/lib/merge_accounting_client/models/address_type_enum.rb +1 -1
- data/lib/merge_accounting_client/models/balance_sheet.rb +41 -18
- data/lib/merge_accounting_client/models/cash_flow_statement.rb +41 -18
- data/lib/merge_accounting_client/models/categories_enum.rb +4 -2
- data/lib/merge_accounting_client/models/category_enum.rb +4 -2
- data/lib/merge_accounting_client/models/category_type_enum.rb +1 -1
- data/lib/merge_accounting_client/models/classification_enum.rb +1 -1
- data/lib/merge_accounting_client/models/common_model_scope_data.rb +234 -0
- data/lib/merge_accounting_client/models/common_model_scopes.rb +234 -0
- data/lib/merge_accounting_client/models/common_model_scopes_body_request.rb +274 -0
- data/lib/merge_accounting_client/models/common_model_scopes_disabled_models.rb +283 -0
- data/lib/merge_accounting_client/models/common_model_scopes_disabled_models_enabled_actions_enum.rb +45 -0
- data/lib/merge_accounting_client/models/common_model_scopes_post_inner_deserializer_request.rb +274 -0
- data/lib/merge_accounting_client/models/common_model_scopes_update_serializer.rb +226 -0
- data/lib/merge_accounting_client/models/company_info.rb +29 -17
- data/lib/merge_accounting_client/models/condition_schema.rb +298 -0
- data/lib/merge_accounting_client/models/condition_type_enum.rb +50 -0
- data/lib/merge_accounting_client/models/contact.rb +41 -18
- data/lib/merge_accounting_client/models/contact_endpoint_request.rb +223 -0
- data/lib/merge_accounting_client/models/contact_request.rb +346 -0
- data/lib/merge_accounting_client/models/contact_response.rb +266 -0
- data/lib/merge_accounting_client/models/country_enum.rb +1 -1
- data/lib/merge_accounting_client/models/credit_note.rb +43 -20
- data/lib/merge_accounting_client/models/credit_note_line_item.rb +40 -12
- data/lib/merge_accounting_client/models/credit_note_status_enum.rb +1 -1
- data/lib/merge_accounting_client/models/currency_enum.rb +1 -1
- data/lib/merge_accounting_client/models/data_passthrough_request.rb +2 -1
- data/lib/merge_accounting_client/models/enabled_actions_enum.rb +45 -0
- data/lib/merge_accounting_client/models/encoding_enum.rb +1 -1
- data/lib/merge_accounting_client/models/end_user_details_request.rb +20 -7
- data/lib/merge_accounting_client/models/expense.rb +91 -38
- data/lib/merge_accounting_client/models/expense_endpoint_request.rb +223 -0
- data/lib/merge_accounting_client/models/expense_line.rb +51 -17
- data/lib/merge_accounting_client/models/expense_line_request.rb +332 -0
- data/lib/merge_accounting_client/models/expense_request.rb +350 -0
- data/lib/merge_accounting_client/models/expense_response.rb +266 -0
- data/lib/merge_accounting_client/models/income_statement.rb +44 -21
- data/lib/merge_accounting_client/models/invoice.rb +94 -42
- data/lib/merge_accounting_client/models/invoice_line_item.rb +99 -26
- data/lib/merge_accounting_client/models/invoice_line_item_request.rb +102 -17
- data/lib/merge_accounting_client/models/invoice_request.rb +85 -32
- data/lib/merge_accounting_client/models/invoice_type_enum.rb +1 -1
- data/lib/merge_accounting_client/models/issue.rb +16 -5
- data/lib/merge_accounting_client/models/item.rb +44 -19
- data/lib/merge_accounting_client/models/journal_entry.rb +100 -38
- data/lib/merge_accounting_client/models/journal_entry_request.rb +92 -40
- data/lib/merge_accounting_client/models/journal_line.rb +28 -17
- data/lib/merge_accounting_client/models/journal_line_request.rb +52 -17
- data/lib/merge_accounting_client/models/link_token.rb +0 -5
- data/lib/merge_accounting_client/models/linked_account_condition.rb +282 -0
- data/lib/merge_accounting_client/models/linked_account_condition_request.rb +269 -0
- data/lib/merge_accounting_client/models/linked_account_selective_sync_configuration.rb +221 -0
- data/lib/merge_accounting_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
- data/lib/merge_accounting_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
- data/lib/merge_accounting_client/models/meta_response.rb +13 -2
- data/lib/merge_accounting_client/models/method_enum.rb +1 -1
- data/lib/merge_accounting_client/models/multipart_form_field_request.rb +1 -1
- data/lib/merge_accounting_client/models/operator_schema.rb +229 -0
- data/lib/merge_accounting_client/models/paginated_condition_schema_list.rb +240 -0
- data/lib/merge_accounting_client/models/payment.rb +82 -18
- data/lib/merge_accounting_client/models/payment_endpoint_request.rb +223 -0
- data/lib/merge_accounting_client/models/payment_request.rb +328 -0
- data/lib/merge_accounting_client/models/payment_response.rb +266 -0
- data/lib/merge_accounting_client/models/posting_status_enum.rb +45 -0
- data/lib/merge_accounting_client/models/purchase_order.rb +92 -41
- data/lib/merge_accounting_client/models/purchase_order_endpoint_request.rb +223 -0
- data/lib/merge_accounting_client/models/purchase_order_line_item.rb +79 -12
- data/lib/merge_accounting_client/models/purchase_order_line_item_request.rb +422 -0
- data/lib/merge_accounting_client/models/purchase_order_request.rb +383 -0
- data/lib/merge_accounting_client/models/purchase_order_response.rb +266 -0
- data/lib/merge_accounting_client/models/purchase_order_status_enum.rb +1 -1
- data/lib/merge_accounting_client/models/remote_data.rb +1 -1
- data/lib/merge_accounting_client/models/remote_data_request.rb +1 -1
- data/lib/merge_accounting_client/models/remote_response.rb +3 -6
- data/lib/merge_accounting_client/models/report_item.rb +15 -4
- data/lib/merge_accounting_client/models/request_format_enum.rb +1 -1
- data/lib/merge_accounting_client/models/response_type_enum.rb +1 -1
- data/lib/merge_accounting_client/models/selective_sync_configurations_usage_enum.rb +45 -0
- data/lib/merge_accounting_client/models/state_enum.rb +1 -1
- data/lib/merge_accounting_client/models/status7d1_enum.rb +1 -1
- data/lib/merge_accounting_client/models/sync_status.rb +13 -4
- data/lib/merge_accounting_client/models/sync_status_status_enum.rb +1 -1
- data/lib/merge_accounting_client/models/tax_rate.rb +59 -36
- data/lib/merge_accounting_client/models/tracking_category.rb +72 -38
- data/lib/merge_accounting_client/models/transaction.rb +97 -46
- data/lib/merge_accounting_client/models/transaction_line_item.rb +75 -19
- data/lib/merge_accounting_client/models/vendor_credit.rb +70 -18
- data/lib/merge_accounting_client/models/vendor_credit_line.rb +34 -6
- data/lib/merge_accounting_client/version.rb +1 -1
- data/lib/merge_accounting_client.rb +42 -1
- data/spec/api/accounts_api_spec.rb +30 -2
- data/spec/api/addresses_api_spec.rb +2 -1
- data/spec/api/attachments_api_spec.rb +26 -0
- data/spec/api/balance_sheets_api_spec.rb +1 -0
- data/spec/api/cash_flow_statements_api_spec.rb +1 -0
- data/spec/api/common_model_scopes_api_spec.rb +58 -0
- data/spec/api/company_info_api_spec.rb +0 -2
- data/spec/api/contacts_api_spec.rb +30 -4
- data/spec/api/credit_notes_api_spec.rb +7 -4
- data/spec/api/expenses_api_spec.rb +28 -2
- data/spec/api/income_statements_api_spec.rb +1 -0
- data/spec/api/invoices_api_spec.rb +8 -5
- data/spec/api/issues_api_spec.rb +1 -1
- data/spec/api/items_api_spec.rb +5 -4
- data/spec/api/journal_entries_api_spec.rb +3 -2
- data/spec/api/linked_accounts_api_spec.rb +1 -1
- data/spec/api/payments_api_spec.rb +28 -2
- data/spec/api/purchase_orders_api_spec.rb +32 -4
- data/spec/api/selective_sync_api_spec.rb +72 -0
- data/spec/api/tax_rates_api_spec.rb +1 -0
- data/spec/api/tracking_categories_api_spec.rb +5 -2
- data/spec/api/transactions_api_spec.rb +3 -2
- data/spec/api/vendor_credits_api_spec.rb +3 -2
- data/spec/models/account_endpoint_request_spec.rb +34 -0
- data/spec/models/account_request_spec.rb +100 -0
- data/spec/models/account_response_spec.rb +52 -0
- data/spec/models/account_spec.rb +18 -6
- data/spec/models/accounting_attachment_endpoint_request_spec.rb +34 -0
- data/spec/models/accounting_attachment_request_spec.rb +58 -0
- data/spec/models/accounting_attachment_response_spec.rb +52 -0
- data/spec/models/accounting_attachment_spec.rb +15 -3
- data/spec/models/accounting_phone_number_request_spec.rb +52 -0
- data/spec/models/address_spec.rb +6 -0
- data/spec/models/balance_sheet_spec.rb +15 -3
- data/spec/models/cash_flow_statement_spec.rb +15 -3
- data/spec/models/common_model_scope_data_spec.rb +40 -0
- data/spec/models/common_model_scopes_body_request_spec.rb +46 -0
- data/spec/models/common_model_scopes_disabled_models_enabled_actions_enum_spec.rb +28 -0
- data/spec/models/common_model_scopes_disabled_models_spec.rb +58 -0
- data/spec/models/common_model_scopes_post_inner_deserializer_request_spec.rb +46 -0
- data/spec/models/common_model_scopes_spec.rb +40 -0
- data/spec/models/common_model_scopes_update_serializer_spec.rb +34 -0
- data/spec/models/company_info_spec.rb +12 -6
- data/spec/models/condition_schema_spec.rb +70 -0
- data/spec/models/condition_type_enum_spec.rb +28 -0
- data/spec/models/contact_endpoint_request_spec.rb +34 -0
- data/spec/models/contact_request_spec.rb +100 -0
- data/spec/models/contact_response_spec.rb +52 -0
- data/spec/models/contact_spec.rb +18 -6
- data/spec/models/credit_note_line_item_spec.rb +12 -0
- data/spec/models/credit_note_spec.rb +17 -5
- data/spec/models/enabled_actions_enum_spec.rb +28 -0
- data/spec/models/end_user_details_request_spec.rb +6 -0
- data/spec/models/expense_endpoint_request_spec.rb +34 -0
- data/spec/models/expense_line_request_spec.rb +94 -0
- data/spec/models/expense_line_spec.rb +22 -4
- data/spec/models/expense_request_spec.rb +94 -0
- data/spec/models/expense_response_spec.rb +52 -0
- data/spec/models/expense_spec.rb +30 -12
- data/spec/models/income_statement_spec.rb +15 -3
- data/spec/models/invoice_line_item_request_spec.rb +41 -5
- data/spec/models/invoice_line_item_spec.rb +36 -6
- data/spec/models/invoice_request_spec.rb +26 -8
- data/spec/models/invoice_spec.rb +34 -16
- data/spec/models/issue_spec.rb +6 -0
- data/spec/models/item_spec.rb +18 -6
- data/spec/models/journal_entry_request_spec.rb +25 -7
- data/spec/models/journal_entry_spec.rb +35 -11
- data/spec/models/journal_line_request_spec.rb +22 -4
- data/spec/models/journal_line_spec.rb +10 -4
- data/spec/models/linked_account_condition_request_spec.rb +46 -0
- data/spec/models/linked_account_condition_spec.rb +64 -0
- data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
- data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
- data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
- data/spec/models/meta_response_spec.rb +6 -0
- data/spec/models/operator_schema_spec.rb +40 -0
- data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
- data/spec/models/payment_endpoint_request_spec.rb +34 -0
- data/spec/models/payment_request_spec.rb +82 -0
- data/spec/models/payment_response_spec.rb +52 -0
- data/spec/models/payment_spec.rb +28 -4
- data/spec/models/posting_status_enum_spec.rb +28 -0
- data/spec/models/purchase_order_endpoint_request_spec.rb +34 -0
- data/spec/models/purchase_order_line_item_request_spec.rb +112 -0
- data/spec/models/purchase_order_line_item_spec.rb +24 -0
- data/spec/models/purchase_order_request_spec.rb +112 -0
- data/spec/models/purchase_order_response_spec.rb +52 -0
- data/spec/models/purchase_order_spec.rb +34 -16
- data/spec/models/report_item_spec.rb +6 -0
- data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
- data/spec/models/sync_status_spec.rb +6 -0
- data/spec/models/tax_rate_spec.rb +19 -7
- data/spec/models/tracking_category_spec.rb +25 -7
- data/spec/models/transaction_line_item_spec.rb +19 -1
- data/spec/models/transaction_spec.rb +30 -12
- data/spec/models/vendor_credit_line_spec.rb +12 -0
- data/spec/models/vendor_credit_spec.rb +24 -6
- metadata +283 -115
@@ -19,9 +19,86 @@ module MergeAccountingClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Creates an `Account` object with the given values.
|
23
|
+
# @param x_account_token [String] Token identifying the end user.
|
24
|
+
# @param account_endpoint_request [AccountEndpointRequest]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Boolean] :is_debug_mode Whether to include debug fields (such as log file links) in the response.
|
27
|
+
# @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
|
28
|
+
# @return [AccountResponse]
|
29
|
+
def accounts_create(x_account_token, account_endpoint_request, opts = {})
|
30
|
+
data, _status_code, _headers = accounts_create_with_http_info(x_account_token, account_endpoint_request, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Creates an `Account` object with the given values.
|
35
|
+
# @param x_account_token [String] Token identifying the end user.
|
36
|
+
# @param account_endpoint_request [AccountEndpointRequest]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [Boolean] :is_debug_mode Whether to include debug fields (such as log file links) in the response.
|
39
|
+
# @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
|
40
|
+
# @return [Array<(AccountResponse, Integer, Hash)>] AccountResponse data, response status code and response headers
|
41
|
+
def accounts_create_with_http_info(x_account_token, account_endpoint_request, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: AccountsApi.accounts_create ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'x_account_token' is set
|
46
|
+
if @api_client.config.client_side_validation && x_account_token.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling AccountsApi.accounts_create"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'account_endpoint_request' is set
|
50
|
+
if @api_client.config.client_side_validation && account_endpoint_request.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'account_endpoint_request' when calling AccountsApi.accounts_create"
|
52
|
+
end
|
53
|
+
# resource path
|
54
|
+
local_var_path = '/accounts'
|
55
|
+
|
56
|
+
# query parameters
|
57
|
+
query_params = opts[:query_params] || {}
|
58
|
+
query_params[:'is_debug_mode'] = opts[:'is_debug_mode'] if !opts[:'is_debug_mode'].nil?
|
59
|
+
query_params[:'run_async'] = opts[:'run_async'] if !opts[:'run_async'].nil?
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = opts[:header_params] || {}
|
63
|
+
# HTTP header 'Accept' (if needed)
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
65
|
+
# HTTP header 'Content-Type'
|
66
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
67
|
+
header_params[:'X-Account-Token'] = x_account_token
|
68
|
+
|
69
|
+
# form parameters
|
70
|
+
form_params = opts[:form_params] || {}
|
71
|
+
|
72
|
+
# http body (model)
|
73
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(account_endpoint_request)
|
74
|
+
|
75
|
+
# return_type
|
76
|
+
return_type = opts[:debug_return_type] || 'AccountResponse'
|
77
|
+
|
78
|
+
# auth_names
|
79
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
80
|
+
|
81
|
+
new_options = opts.merge(
|
82
|
+
:operation => :"AccountsApi.accounts_create",
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => return_type
|
89
|
+
)
|
90
|
+
|
91
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
92
|
+
if @api_client.config.debugging
|
93
|
+
@api_client.config.logger.debug "API called: AccountsApi#accounts_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
94
|
+
end
|
95
|
+
return data, status_code, headers
|
96
|
+
end
|
97
|
+
|
22
98
|
# Returns a list of `Account` objects.
|
23
99
|
# @param x_account_token [String] Token identifying the end user.
|
24
100
|
# @param [Hash] opts the optional parameters
|
101
|
+
# @option opts [String] :company_id If provided, will only return accounts for this company.
|
25
102
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
26
103
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
104
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -30,8 +107,9 @@ module MergeAccountingClient
|
|
30
107
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
31
108
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
32
109
|
# @option opts [Integer] :page_size Number of results to return per page.
|
33
|
-
# @option opts [String] :remote_fields
|
110
|
+
# @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
|
34
111
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
112
|
+
# @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
|
35
113
|
# @return [PaginatedAccountList]
|
36
114
|
def accounts_list(x_account_token, opts = {})
|
37
115
|
data, _status_code, _headers = accounts_list_with_http_info(x_account_token, opts)
|
@@ -41,6 +119,7 @@ module MergeAccountingClient
|
|
41
119
|
# Returns a list of `Account` objects.
|
42
120
|
# @param x_account_token [String] Token identifying the end user.
|
43
121
|
# @param [Hash] opts the optional parameters
|
122
|
+
# @option opts [String] :company_id If provided, will only return accounts for this company.
|
44
123
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
45
124
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
46
125
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -49,8 +128,9 @@ module MergeAccountingClient
|
|
49
128
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
50
129
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
51
130
|
# @option opts [Integer] :page_size Number of results to return per page.
|
52
|
-
# @option opts [String] :remote_fields
|
131
|
+
# @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
|
53
132
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
133
|
+
# @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
|
54
134
|
# @return [Array<(PaginatedAccountList, Integer, Hash)>] PaginatedAccountList data, response status code and response headers
|
55
135
|
def accounts_list_with_http_info(x_account_token, opts = {})
|
56
136
|
if @api_client.config.debugging
|
@@ -64,11 +144,16 @@ module MergeAccountingClient
|
|
64
144
|
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
65
145
|
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
66
146
|
end
|
147
|
+
allowable_values = ["classification", "classification,status", "status"]
|
148
|
+
if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
|
149
|
+
fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
|
150
|
+
end
|
67
151
|
# resource path
|
68
152
|
local_var_path = '/accounts'
|
69
153
|
|
70
154
|
# query parameters
|
71
155
|
query_params = opts[:query_params] || {}
|
156
|
+
query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil?
|
72
157
|
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
73
158
|
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
74
159
|
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
@@ -79,6 +164,7 @@ module MergeAccountingClient
|
|
79
164
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
80
165
|
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
81
166
|
query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
|
167
|
+
query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
|
82
168
|
|
83
169
|
# header parameters
|
84
170
|
header_params = opts[:header_params] || {}
|
@@ -115,12 +201,75 @@ module MergeAccountingClient
|
|
115
201
|
return data, status_code, headers
|
116
202
|
end
|
117
203
|
|
204
|
+
# Returns metadata for `Account` POSTs.
|
205
|
+
# @param x_account_token [String] Token identifying the end user.
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @return [MetaResponse]
|
208
|
+
def accounts_meta_post_retrieve(x_account_token, opts = {})
|
209
|
+
data, _status_code, _headers = accounts_meta_post_retrieve_with_http_info(x_account_token, opts)
|
210
|
+
data
|
211
|
+
end
|
212
|
+
|
213
|
+
# Returns metadata for `Account` POSTs.
|
214
|
+
# @param x_account_token [String] Token identifying the end user.
|
215
|
+
# @param [Hash] opts the optional parameters
|
216
|
+
# @return [Array<(MetaResponse, Integer, Hash)>] MetaResponse data, response status code and response headers
|
217
|
+
def accounts_meta_post_retrieve_with_http_info(x_account_token, opts = {})
|
218
|
+
if @api_client.config.debugging
|
219
|
+
@api_client.config.logger.debug 'Calling API: AccountsApi.accounts_meta_post_retrieve ...'
|
220
|
+
end
|
221
|
+
# verify the required parameter 'x_account_token' is set
|
222
|
+
if @api_client.config.client_side_validation && x_account_token.nil?
|
223
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling AccountsApi.accounts_meta_post_retrieve"
|
224
|
+
end
|
225
|
+
# resource path
|
226
|
+
local_var_path = '/accounts/meta/post'
|
227
|
+
|
228
|
+
# query parameters
|
229
|
+
query_params = opts[:query_params] || {}
|
230
|
+
|
231
|
+
# header parameters
|
232
|
+
header_params = opts[:header_params] || {}
|
233
|
+
# HTTP header 'Accept' (if needed)
|
234
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
235
|
+
header_params[:'X-Account-Token'] = x_account_token
|
236
|
+
|
237
|
+
# form parameters
|
238
|
+
form_params = opts[:form_params] || {}
|
239
|
+
|
240
|
+
# http body (model)
|
241
|
+
post_body = opts[:debug_body]
|
242
|
+
|
243
|
+
# return_type
|
244
|
+
return_type = opts[:debug_return_type] || 'MetaResponse'
|
245
|
+
|
246
|
+
# auth_names
|
247
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
248
|
+
|
249
|
+
new_options = opts.merge(
|
250
|
+
:operation => :"AccountsApi.accounts_meta_post_retrieve",
|
251
|
+
:header_params => header_params,
|
252
|
+
:query_params => query_params,
|
253
|
+
:form_params => form_params,
|
254
|
+
:body => post_body,
|
255
|
+
:auth_names => auth_names,
|
256
|
+
:return_type => return_type
|
257
|
+
)
|
258
|
+
|
259
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
260
|
+
if @api_client.config.debugging
|
261
|
+
@api_client.config.logger.debug "API called: AccountsApi#accounts_meta_post_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
262
|
+
end
|
263
|
+
return data, status_code, headers
|
264
|
+
end
|
265
|
+
|
118
266
|
# Returns an `Account` object with the given `id`.
|
119
267
|
# @param x_account_token [String] Token identifying the end user.
|
120
268
|
# @param id [String]
|
121
269
|
# @param [Hash] opts the optional parameters
|
122
270
|
# @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
|
271
|
+
# @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
|
272
|
+
# @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
|
124
273
|
# @return [Account]
|
125
274
|
def accounts_retrieve(x_account_token, id, opts = {})
|
126
275
|
data, _status_code, _headers = accounts_retrieve_with_http_info(x_account_token, id, opts)
|
@@ -132,7 +281,8 @@ module MergeAccountingClient
|
|
132
281
|
# @param id [String]
|
133
282
|
# @param [Hash] opts the optional parameters
|
134
283
|
# @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
|
284
|
+
# @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
|
285
|
+
# @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
|
136
286
|
# @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers
|
137
287
|
def accounts_retrieve_with_http_info(x_account_token, id, opts = {})
|
138
288
|
if @api_client.config.debugging
|
@@ -150,6 +300,10 @@ module MergeAccountingClient
|
|
150
300
|
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
151
301
|
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
152
302
|
end
|
303
|
+
allowable_values = ["classification", "classification,status", "status"]
|
304
|
+
if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
|
305
|
+
fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
|
306
|
+
end
|
153
307
|
# resource path
|
154
308
|
local_var_path = '/accounts/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
155
309
|
|
@@ -157,6 +311,7 @@ module MergeAccountingClient
|
|
157
311
|
query_params = opts[:query_params] || {}
|
158
312
|
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
159
313
|
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
314
|
+
query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
|
160
315
|
|
161
316
|
# header parameters
|
162
317
|
header_params = opts[:header_params] || {}
|
@@ -24,7 +24,8 @@ module MergeAccountingClient
|
|
24
24
|
# @param id [String]
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
26
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
27
|
-
# @option opts [String] :remote_fields
|
27
|
+
# @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
|
28
|
+
# @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
|
28
29
|
# @return [Address]
|
29
30
|
def addresses_retrieve(x_account_token, id, opts = {})
|
30
31
|
data, _status_code, _headers = addresses_retrieve_with_http_info(x_account_token, id, opts)
|
@@ -36,7 +37,8 @@ module MergeAccountingClient
|
|
36
37
|
# @param id [String]
|
37
38
|
# @param [Hash] opts the optional parameters
|
38
39
|
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
39
|
-
# @option opts [String] :remote_fields
|
40
|
+
# @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
|
41
|
+
# @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
|
40
42
|
# @return [Array<(Address, Integer, Hash)>] Address data, response status code and response headers
|
41
43
|
def addresses_retrieve_with_http_info(x_account_token, id, opts = {})
|
42
44
|
if @api_client.config.debugging
|
@@ -54,6 +56,10 @@ module MergeAccountingClient
|
|
54
56
|
if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
|
55
57
|
fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
|
56
58
|
end
|
59
|
+
allowable_values = ["type"]
|
60
|
+
if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
|
61
|
+
fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
|
62
|
+
end
|
57
63
|
# resource path
|
58
64
|
local_var_path = '/addresses/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
59
65
|
|
@@ -61,6 +67,7 @@ module MergeAccountingClient
|
|
61
67
|
query_params = opts[:query_params] || {}
|
62
68
|
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
63
69
|
query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
|
70
|
+
query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
|
64
71
|
|
65
72
|
# header parameters
|
66
73
|
header_params = opts[:header_params] || {}
|
@@ -19,9 +19,86 @@ module MergeAccountingClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Creates an `AccountingAttachment` object with the given values.
|
23
|
+
# @param x_account_token [String] Token identifying the end user.
|
24
|
+
# @param accounting_attachment_endpoint_request [AccountingAttachmentEndpointRequest]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Boolean] :is_debug_mode Whether to include debug fields (such as log file links) in the response.
|
27
|
+
# @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
|
28
|
+
# @return [AccountingAttachmentResponse]
|
29
|
+
def attachments_create(x_account_token, accounting_attachment_endpoint_request, opts = {})
|
30
|
+
data, _status_code, _headers = attachments_create_with_http_info(x_account_token, accounting_attachment_endpoint_request, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Creates an `AccountingAttachment` object with the given values.
|
35
|
+
# @param x_account_token [String] Token identifying the end user.
|
36
|
+
# @param accounting_attachment_endpoint_request [AccountingAttachmentEndpointRequest]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [Boolean] :is_debug_mode Whether to include debug fields (such as log file links) in the response.
|
39
|
+
# @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
|
40
|
+
# @return [Array<(AccountingAttachmentResponse, Integer, Hash)>] AccountingAttachmentResponse data, response status code and response headers
|
41
|
+
def attachments_create_with_http_info(x_account_token, accounting_attachment_endpoint_request, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: AttachmentsApi.attachments_create ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'x_account_token' is set
|
46
|
+
if @api_client.config.client_side_validation && x_account_token.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling AttachmentsApi.attachments_create"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'accounting_attachment_endpoint_request' is set
|
50
|
+
if @api_client.config.client_side_validation && accounting_attachment_endpoint_request.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'accounting_attachment_endpoint_request' when calling AttachmentsApi.attachments_create"
|
52
|
+
end
|
53
|
+
# resource path
|
54
|
+
local_var_path = '/attachments'
|
55
|
+
|
56
|
+
# query parameters
|
57
|
+
query_params = opts[:query_params] || {}
|
58
|
+
query_params[:'is_debug_mode'] = opts[:'is_debug_mode'] if !opts[:'is_debug_mode'].nil?
|
59
|
+
query_params[:'run_async'] = opts[:'run_async'] if !opts[:'run_async'].nil?
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = opts[:header_params] || {}
|
63
|
+
# HTTP header 'Accept' (if needed)
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
65
|
+
# HTTP header 'Content-Type'
|
66
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
67
|
+
header_params[:'X-Account-Token'] = x_account_token
|
68
|
+
|
69
|
+
# form parameters
|
70
|
+
form_params = opts[:form_params] || {}
|
71
|
+
|
72
|
+
# http body (model)
|
73
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(accounting_attachment_endpoint_request)
|
74
|
+
|
75
|
+
# return_type
|
76
|
+
return_type = opts[:debug_return_type] || 'AccountingAttachmentResponse'
|
77
|
+
|
78
|
+
# auth_names
|
79
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
80
|
+
|
81
|
+
new_options = opts.merge(
|
82
|
+
:operation => :"AttachmentsApi.attachments_create",
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => return_type
|
89
|
+
)
|
90
|
+
|
91
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
92
|
+
if @api_client.config.debugging
|
93
|
+
@api_client.config.logger.debug "API called: AttachmentsApi#attachments_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
94
|
+
end
|
95
|
+
return data, status_code, headers
|
96
|
+
end
|
97
|
+
|
22
98
|
# Returns a list of `AccountingAttachment` objects.
|
23
99
|
# @param x_account_token [String] Token identifying the end user.
|
24
100
|
# @param [Hash] opts the optional parameters
|
101
|
+
# @option opts [String] :company_id If provided, will only return accounting attachments for this company.
|
25
102
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
26
103
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
104
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -40,6 +117,7 @@ module MergeAccountingClient
|
|
40
117
|
# Returns a list of `AccountingAttachment` objects.
|
41
118
|
# @param x_account_token [String] Token identifying the end user.
|
42
119
|
# @param [Hash] opts the optional parameters
|
120
|
+
# @option opts [String] :company_id If provided, will only return accounting attachments for this company.
|
43
121
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
44
122
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
45
123
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -63,6 +141,7 @@ module MergeAccountingClient
|
|
63
141
|
|
64
142
|
# query parameters
|
65
143
|
query_params = opts[:query_params] || {}
|
144
|
+
query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil?
|
66
145
|
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
67
146
|
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
68
147
|
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
@@ -108,6 +187,68 @@ module MergeAccountingClient
|
|
108
187
|
return data, status_code, headers
|
109
188
|
end
|
110
189
|
|
190
|
+
# Returns metadata for `AccountingAttachment` POSTs.
|
191
|
+
# @param x_account_token [String] Token identifying the end user.
|
192
|
+
# @param [Hash] opts the optional parameters
|
193
|
+
# @return [MetaResponse]
|
194
|
+
def attachments_meta_post_retrieve(x_account_token, opts = {})
|
195
|
+
data, _status_code, _headers = attachments_meta_post_retrieve_with_http_info(x_account_token, opts)
|
196
|
+
data
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns metadata for `AccountingAttachment` POSTs.
|
200
|
+
# @param x_account_token [String] Token identifying the end user.
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [Array<(MetaResponse, Integer, Hash)>] MetaResponse data, response status code and response headers
|
203
|
+
def attachments_meta_post_retrieve_with_http_info(x_account_token, opts = {})
|
204
|
+
if @api_client.config.debugging
|
205
|
+
@api_client.config.logger.debug 'Calling API: AttachmentsApi.attachments_meta_post_retrieve ...'
|
206
|
+
end
|
207
|
+
# verify the required parameter 'x_account_token' is set
|
208
|
+
if @api_client.config.client_side_validation && x_account_token.nil?
|
209
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling AttachmentsApi.attachments_meta_post_retrieve"
|
210
|
+
end
|
211
|
+
# resource path
|
212
|
+
local_var_path = '/attachments/meta/post'
|
213
|
+
|
214
|
+
# query parameters
|
215
|
+
query_params = opts[:query_params] || {}
|
216
|
+
|
217
|
+
# header parameters
|
218
|
+
header_params = opts[:header_params] || {}
|
219
|
+
# HTTP header 'Accept' (if needed)
|
220
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
221
|
+
header_params[:'X-Account-Token'] = x_account_token
|
222
|
+
|
223
|
+
# form parameters
|
224
|
+
form_params = opts[:form_params] || {}
|
225
|
+
|
226
|
+
# http body (model)
|
227
|
+
post_body = opts[:debug_body]
|
228
|
+
|
229
|
+
# return_type
|
230
|
+
return_type = opts[:debug_return_type] || 'MetaResponse'
|
231
|
+
|
232
|
+
# auth_names
|
233
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
234
|
+
|
235
|
+
new_options = opts.merge(
|
236
|
+
:operation => :"AttachmentsApi.attachments_meta_post_retrieve",
|
237
|
+
:header_params => header_params,
|
238
|
+
:query_params => query_params,
|
239
|
+
:form_params => form_params,
|
240
|
+
:body => post_body,
|
241
|
+
:auth_names => auth_names,
|
242
|
+
:return_type => return_type
|
243
|
+
)
|
244
|
+
|
245
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
246
|
+
if @api_client.config.debugging
|
247
|
+
@api_client.config.logger.debug "API called: AttachmentsApi#attachments_meta_post_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
248
|
+
end
|
249
|
+
return data, status_code, headers
|
250
|
+
end
|
251
|
+
|
111
252
|
# Returns an `AccountingAttachment` object with the given `id`.
|
112
253
|
# @param x_account_token [String] Token identifying the end user.
|
113
254
|
# @param id [String]
|
@@ -22,6 +22,7 @@ module MergeAccountingClient
|
|
22
22
|
# Returns a list of `BalanceSheet` objects.
|
23
23
|
# @param x_account_token [String] Token identifying the end user.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :company_id If provided, will only return balance sheets for this company.
|
25
26
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
26
27
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
28
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -40,6 +41,7 @@ module MergeAccountingClient
|
|
40
41
|
# Returns a list of `BalanceSheet` objects.
|
41
42
|
# @param x_account_token [String] Token identifying the end user.
|
42
43
|
# @param [Hash] opts the optional parameters
|
44
|
+
# @option opts [String] :company_id If provided, will only return balance sheets for this company.
|
43
45
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
44
46
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
45
47
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -63,6 +65,7 @@ module MergeAccountingClient
|
|
63
65
|
|
64
66
|
# query parameters
|
65
67
|
query_params = opts[:query_params] || {}
|
68
|
+
query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil?
|
66
69
|
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
67
70
|
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
68
71
|
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
@@ -22,6 +22,7 @@ module MergeAccountingClient
|
|
22
22
|
# Returns a list of `CashFlowStatement` objects.
|
23
23
|
# @param x_account_token [String] Token identifying the end user.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :company_id If provided, will only return cash flow statements for this company.
|
25
26
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
26
27
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
28
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -40,6 +41,7 @@ module MergeAccountingClient
|
|
40
41
|
# Returns a list of `CashFlowStatement` objects.
|
41
42
|
# @param x_account_token [String] Token identifying the end user.
|
42
43
|
# @param [Hash] opts the optional parameters
|
44
|
+
# @option opts [String] :company_id If provided, will only return cash flow statements for this company.
|
43
45
|
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
44
46
|
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
45
47
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -63,6 +65,7 @@ module MergeAccountingClient
|
|
63
65
|
|
64
66
|
# query parameters
|
65
67
|
query_params = opts[:query_params] || {}
|
68
|
+
query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil?
|
66
69
|
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
67
70
|
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
68
71
|
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
@@ -0,0 +1,146 @@
|
|
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 CommonModelScopesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Update the configuration of what data is saved by Merge when syncing. Common model scopes are set as a default across all linked accounts, but can be updated to have greater granularity per account.
|
23
|
+
# @param common_model_scopes_update_serializer [CommonModelScopesUpdateSerializer]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :linked_account_id ID of specific linked account to fetch
|
26
|
+
# @return [CommonModelScopes]
|
27
|
+
def common_model_scopes_create(common_model_scopes_update_serializer, opts = {})
|
28
|
+
data, _status_code, _headers = common_model_scopes_create_with_http_info(common_model_scopes_update_serializer, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Update the configuration of what data is saved by Merge when syncing. Common model scopes are set as a default across all linked accounts, but can be updated to have greater granularity per account.
|
33
|
+
# @param common_model_scopes_update_serializer [CommonModelScopesUpdateSerializer]
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @option opts [String] :linked_account_id ID of specific linked account to fetch
|
36
|
+
# @return [Array<(CommonModelScopes, Integer, Hash)>] CommonModelScopes data, response status code and response headers
|
37
|
+
def common_model_scopes_create_with_http_info(common_model_scopes_update_serializer, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: CommonModelScopesApi.common_model_scopes_create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'common_model_scopes_update_serializer' is set
|
42
|
+
if @api_client.config.client_side_validation && common_model_scopes_update_serializer.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'common_model_scopes_update_serializer' when calling CommonModelScopesApi.common_model_scopes_create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/common-model-scopes'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
query_params[:'linked_account_id'] = opts[:'linked_account_id'] if !opts[:'linked_account_id'].nil?
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = opts[:header_params] || {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = opts[:form_params] || {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(common_model_scopes_update_serializer)
|
64
|
+
|
65
|
+
# return_type
|
66
|
+
return_type = opts[:debug_return_type] || 'CommonModelScopes'
|
67
|
+
|
68
|
+
# auth_names
|
69
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
70
|
+
|
71
|
+
new_options = opts.merge(
|
72
|
+
:operation => :"CommonModelScopesApi.common_model_scopes_create",
|
73
|
+
:header_params => header_params,
|
74
|
+
:query_params => query_params,
|
75
|
+
:form_params => form_params,
|
76
|
+
:body => post_body,
|
77
|
+
:auth_names => auth_names,
|
78
|
+
:return_type => return_type
|
79
|
+
)
|
80
|
+
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
82
|
+
if @api_client.config.debugging
|
83
|
+
@api_client.config.logger.debug "API called: CommonModelScopesApi#common_model_scopes_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
84
|
+
end
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
|
88
|
+
# Fetch the configuration of what data is saved by Merge when syncing. Common model scopes are set as a default across all linked accounts, but can be updated to have greater granularity per account.
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @option opts [String] :linked_account_id ID of specific linked account to fetch
|
91
|
+
# @return [CommonModelScopes]
|
92
|
+
def common_model_scopes_retrieve(opts = {})
|
93
|
+
data, _status_code, _headers = common_model_scopes_retrieve_with_http_info(opts)
|
94
|
+
data
|
95
|
+
end
|
96
|
+
|
97
|
+
# Fetch the configuration of what data is saved by Merge when syncing. Common model scopes are set as a default across all linked accounts, but can be updated to have greater granularity per account.
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @option opts [String] :linked_account_id ID of specific linked account to fetch
|
100
|
+
# @return [Array<(CommonModelScopes, Integer, Hash)>] CommonModelScopes data, response status code and response headers
|
101
|
+
def common_model_scopes_retrieve_with_http_info(opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: CommonModelScopesApi.common_model_scopes_retrieve ...'
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/common-model-scopes'
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = opts[:query_params] || {}
|
110
|
+
query_params[:'linked_account_id'] = opts[:'linked_account_id'] if !opts[:'linked_account_id'].nil?
|
111
|
+
|
112
|
+
# header parameters
|
113
|
+
header_params = opts[:header_params] || {}
|
114
|
+
# HTTP header 'Accept' (if needed)
|
115
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
116
|
+
|
117
|
+
# form parameters
|
118
|
+
form_params = opts[:form_params] || {}
|
119
|
+
|
120
|
+
# http body (model)
|
121
|
+
post_body = opts[:debug_body]
|
122
|
+
|
123
|
+
# return_type
|
124
|
+
return_type = opts[:debug_return_type] || 'CommonModelScopes'
|
125
|
+
|
126
|
+
# auth_names
|
127
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
128
|
+
|
129
|
+
new_options = opts.merge(
|
130
|
+
:operation => :"CommonModelScopesApi.common_model_scopes_retrieve",
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: CommonModelScopesApi#common_model_scopes_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|