merge_accounting_client 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +3 -1
- 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/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 +13 -9
- 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/models/account.rb +45 -21
- 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/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/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 +3 -1
- data/lib/merge_accounting_client/models/category_enum.rb +3 -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/credit_note.rb +43 -20
- data/lib/merge_accounting_client/models/credit_note_line_item.rb +40 -12
- data/lib/merge_accounting_client/models/data_passthrough_request.rb +1 -0
- data/lib/merge_accounting_client/models/enabled_actions_enum.rb +45 -0
- data/lib/merge_accounting_client/models/end_user_details_request.rb +18 -5
- 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/issue.rb +15 -4
- 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 +12 -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/report_item.rb +15 -4
- data/lib/merge_accounting_client/models/selective_sync_configurations_usage_enum.rb +45 -0
- data/lib/merge_accounting_client/models/sync_status.rb +13 -4
- data/lib/merge_accounting_client/models/tax_rate.rb +59 -36
- data/lib/merge_accounting_client/models/tracking_category.rb +62 -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 +20 -8
- 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
@@ -14,51 +14,60 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeAccountingClient
|
17
|
-
# # The Item Object ### Description The `Item` object
|
17
|
+
# # The Item Object ### Description The `Item` object refers to the goods involved in a transaction. ### Usage Example Fetch from the `LIST Items` endpoint and view a company's items.
|
18
18
|
class Item
|
19
19
|
attr_accessor :id
|
20
20
|
|
21
21
|
# The third-party API ID of the matching object.
|
22
22
|
attr_accessor :remote_id
|
23
23
|
|
24
|
-
attr_accessor :remote_data
|
25
|
-
|
26
24
|
# The item's name.
|
27
25
|
attr_accessor :name
|
28
26
|
|
29
|
-
# The item's status.
|
27
|
+
# The item's status. * `ACTIVE` - ACTIVE * `ARCHIVED` - ARCHIVED
|
30
28
|
attr_accessor :status
|
31
29
|
|
32
30
|
# The item's unit price.
|
33
31
|
attr_accessor :unit_price
|
34
32
|
|
35
|
-
# The item
|
33
|
+
# The price at which the item is purchased from a vendor.
|
36
34
|
attr_accessor :purchase_price
|
37
35
|
|
36
|
+
# References the default account used to record a purchase of the item.
|
38
37
|
attr_accessor :purchase_account
|
39
38
|
|
39
|
+
# References the default account used to record a sale.
|
40
40
|
attr_accessor :sales_account
|
41
41
|
|
42
|
+
# The company the item belongs to.
|
43
|
+
attr_accessor :company
|
44
|
+
|
42
45
|
# When the third party's item note was updated.
|
43
46
|
attr_accessor :remote_updated_at
|
44
47
|
|
45
48
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
46
49
|
attr_accessor :remote_was_deleted
|
47
50
|
|
51
|
+
attr_accessor :field_mappings
|
52
|
+
|
53
|
+
attr_accessor :remote_data
|
54
|
+
|
48
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
49
56
|
def self.attribute_map
|
50
57
|
{
|
51
58
|
:'id' => :'id',
|
52
59
|
:'remote_id' => :'remote_id',
|
53
|
-
:'remote_data' => :'remote_data',
|
54
60
|
:'name' => :'name',
|
55
61
|
:'status' => :'status',
|
56
62
|
:'unit_price' => :'unit_price',
|
57
63
|
:'purchase_price' => :'purchase_price',
|
58
64
|
:'purchase_account' => :'purchase_account',
|
59
65
|
:'sales_account' => :'sales_account',
|
66
|
+
:'company' => :'company',
|
60
67
|
:'remote_updated_at' => :'remote_updated_at',
|
61
|
-
:'remote_was_deleted' => :'remote_was_deleted'
|
68
|
+
:'remote_was_deleted' => :'remote_was_deleted',
|
69
|
+
:'field_mappings' => :'field_mappings',
|
70
|
+
:'remote_data' => :'remote_data'
|
62
71
|
}
|
63
72
|
end
|
64
73
|
|
@@ -72,15 +81,17 @@ module MergeAccountingClient
|
|
72
81
|
{
|
73
82
|
:'id' => :'String',
|
74
83
|
:'remote_id' => :'String',
|
75
|
-
:'remote_data' => :'Array<RemoteData>',
|
76
84
|
:'name' => :'String',
|
77
85
|
:'status' => :'Status7d1Enum',
|
78
86
|
:'unit_price' => :'Float',
|
79
87
|
:'purchase_price' => :'Float',
|
80
88
|
:'purchase_account' => :'String',
|
81
89
|
:'sales_account' => :'String',
|
90
|
+
:'company' => :'String',
|
82
91
|
:'remote_updated_at' => :'Time',
|
83
|
-
:'remote_was_deleted' => :'Boolean'
|
92
|
+
:'remote_was_deleted' => :'Boolean',
|
93
|
+
:'field_mappings' => :'Hash<String, Object>',
|
94
|
+
:'remote_data' => :'Array<RemoteData>'
|
84
95
|
}
|
85
96
|
end
|
86
97
|
|
@@ -88,14 +99,16 @@ module MergeAccountingClient
|
|
88
99
|
def self.openapi_nullable
|
89
100
|
Set.new([
|
90
101
|
:'remote_id',
|
91
|
-
:'remote_data',
|
92
102
|
:'name',
|
93
103
|
:'status',
|
94
104
|
:'unit_price',
|
95
105
|
:'purchase_price',
|
96
106
|
:'purchase_account',
|
97
107
|
:'sales_account',
|
108
|
+
:'company',
|
98
109
|
:'remote_updated_at',
|
110
|
+
:'field_mappings',
|
111
|
+
:'remote_data'
|
99
112
|
])
|
100
113
|
end
|
101
114
|
|
@@ -122,12 +135,6 @@ module MergeAccountingClient
|
|
122
135
|
self.remote_id = attributes[:'remote_id']
|
123
136
|
end
|
124
137
|
|
125
|
-
if attributes.key?(:'remote_data')
|
126
|
-
if (value = attributes[:'remote_data']).is_a?(Array)
|
127
|
-
self.remote_data = value
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
138
|
if attributes.key?(:'name')
|
132
139
|
self.name = attributes[:'name']
|
133
140
|
end
|
@@ -152,6 +159,10 @@ module MergeAccountingClient
|
|
152
159
|
self.sales_account = attributes[:'sales_account']
|
153
160
|
end
|
154
161
|
|
162
|
+
if attributes.key?(:'company')
|
163
|
+
self.company = attributes[:'company']
|
164
|
+
end
|
165
|
+
|
155
166
|
if attributes.key?(:'remote_updated_at')
|
156
167
|
self.remote_updated_at = attributes[:'remote_updated_at']
|
157
168
|
end
|
@@ -159,6 +170,18 @@ module MergeAccountingClient
|
|
159
170
|
if attributes.key?(:'remote_was_deleted')
|
160
171
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
161
172
|
end
|
173
|
+
|
174
|
+
if attributes.key?(:'field_mappings')
|
175
|
+
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
176
|
+
self.field_mappings = value
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.key?(:'remote_data')
|
181
|
+
if (value = attributes[:'remote_data']).is_a?(Array)
|
182
|
+
self.remote_data = value
|
183
|
+
end
|
184
|
+
end
|
162
185
|
end
|
163
186
|
|
164
187
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -181,15 +204,17 @@ module MergeAccountingClient
|
|
181
204
|
self.class == o.class &&
|
182
205
|
id == o.id &&
|
183
206
|
remote_id == o.remote_id &&
|
184
|
-
remote_data == o.remote_data &&
|
185
207
|
name == o.name &&
|
186
208
|
status == o.status &&
|
187
209
|
unit_price == o.unit_price &&
|
188
210
|
purchase_price == o.purchase_price &&
|
189
211
|
purchase_account == o.purchase_account &&
|
190
212
|
sales_account == o.sales_account &&
|
213
|
+
company == o.company &&
|
191
214
|
remote_updated_at == o.remote_updated_at &&
|
192
|
-
remote_was_deleted == o.remote_was_deleted
|
215
|
+
remote_was_deleted == o.remote_was_deleted &&
|
216
|
+
field_mappings == o.field_mappings &&
|
217
|
+
remote_data == o.remote_data
|
193
218
|
end
|
194
219
|
|
195
220
|
# @see the `==` method
|
@@ -201,7 +226,7 @@ module MergeAccountingClient
|
|
201
226
|
# Calculates hash code according to all attributes.
|
202
227
|
# @return [Integer] Hash code
|
203
228
|
def hash
|
204
|
-
[id, remote_id,
|
229
|
+
[id, remote_id, name, status, unit_price, purchase_price, purchase_account, sales_account, company, remote_updated_at, remote_was_deleted, field_mappings, remote_data].hash
|
205
230
|
end
|
206
231
|
|
207
232
|
# Builds the object from hash
|
@@ -14,15 +14,8 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeAccountingClient
|
17
|
-
# # The JournalEntry Object ### Description The `JournalEntry` object is used to
|
17
|
+
# # The JournalEntry Object ### Description The `JournalEntry` object is used to get a record of all manually created entries made in a company’s general ledger. The journal line items for each journal entry should sum to zero. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
|
18
18
|
class JournalEntry
|
19
|
-
attr_accessor :id
|
20
|
-
|
21
|
-
# The third-party API ID of the matching object.
|
22
|
-
attr_accessor :remote_id
|
23
|
-
|
24
|
-
attr_accessor :remote_data
|
25
|
-
|
26
19
|
# The journal entry's transaction date.
|
27
20
|
attr_accessor :transaction_date
|
28
21
|
|
@@ -38,27 +31,49 @@ module MergeAccountingClient
|
|
38
31
|
# The journal entry's private note.
|
39
32
|
attr_accessor :memo
|
40
33
|
|
41
|
-
# The journal's currency.
|
34
|
+
# The journal's currency. * `XUA` - ADB Unit of Account * `AFN` - Afghan Afghani * `AFA` - Afghan Afghani (1927–2002) * `ALL` - Albanian Lek * `ALK` - Albanian Lek (1946–1965) * `DZD` - Algerian Dinar * `ADP` - Andorran Peseta * `AOA` - Angolan Kwanza * `AOK` - Angolan Kwanza (1977–1991) * `AON` - Angolan New Kwanza (1990–2000) * `AOR` - Angolan Readjusted Kwanza (1995–1999) * `ARA` - Argentine Austral * `ARS` - Argentine Peso * `ARM` - Argentine Peso (1881–1970) * `ARP` - Argentine Peso (1983–1985) * `ARL` - Argentine Peso Ley (1970–1983) * `AMD` - Armenian Dram * `AWG` - Aruban Florin * `AUD` - Australian Dollar * `ATS` - Austrian Schilling * `AZN` - Azerbaijani Manat * `AZM` - Azerbaijani Manat (1993–2006) * `BSD` - Bahamian Dollar * `BHD` - Bahraini Dinar * `BDT` - Bangladeshi Taka * `BBD` - Barbadian Dollar * `BYN` - Belarusian Ruble * `BYB` - Belarusian Ruble (1994–1999) * `BYR` - Belarusian Ruble (2000–2016) * `BEF` - Belgian Franc * `BEC` - Belgian Franc (convertible) * `BEL` - Belgian Franc (financial) * `BZD` - Belize Dollar * `BMD` - Bermudan Dollar * `BTN` - Bhutanese Ngultrum * `BOB` - Bolivian Boliviano * `BOL` - Bolivian Boliviano (1863–1963) * `BOV` - Bolivian Mvdol * `BOP` - Bolivian Peso * `BAM` - Bosnia-Herzegovina Convertible Mark * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) * `BWP` - Botswanan Pula * `BRC` - Brazilian Cruzado (1986–1989) * `BRZ` - Brazilian Cruzeiro (1942–1967) * `BRE` - Brazilian Cruzeiro (1990–1993) * `BRR` - Brazilian Cruzeiro (1993–1994) * `BRN` - Brazilian New Cruzado (1989–1990) * `BRB` - Brazilian New Cruzeiro (1967–1986) * `BRL` - Brazilian Real * `GBP` - British Pound * `BND` - Brunei Dollar * `BGL` - Bulgarian Hard Lev * `BGN` - Bulgarian Lev * `BGO` - Bulgarian Lev (1879–1952) * `BGM` - Bulgarian Socialist Lev * `BUK` - Burmese Kyat * `BIF` - Burundian Franc * `XPF` - CFP Franc * `KHR` - Cambodian Riel * `CAD` - Canadian Dollar * `CVE` - Cape Verdean Escudo * `KYD` - Cayman Islands Dollar * `XAF` - Central African CFA Franc * `CLE` - Chilean Escudo * `CLP` - Chilean Peso * `CLF` - Chilean Unit of Account (UF) * `CNX` - Chinese People’s Bank Dollar * `CNY` - Chinese Yuan * `CNH` - Chinese Yuan (offshore) * `COP` - Colombian Peso * `COU` - Colombian Real Value Unit * `KMF` - Comorian Franc * `CDF` - Congolese Franc * `CRC` - Costa Rican Colón * `HRD` - Croatian Dinar * `HRK` - Croatian Kuna * `CUC` - Cuban Convertible Peso * `CUP` - Cuban Peso * `CYP` - Cypriot Pound * `CZK` - Czech Koruna * `CSK` - Czechoslovak Hard Koruna * `DKK` - Danish Krone * `DJF` - Djiboutian Franc * `DOP` - Dominican Peso * `NLG` - Dutch Guilder * `XCD` - East Caribbean Dollar * `DDM` - East German Mark * `ECS` - Ecuadorian Sucre * `ECV` - Ecuadorian Unit of Constant Value * `EGP` - Egyptian Pound * `GQE` - Equatorial Guinean Ekwele * `ERN` - Eritrean Nakfa * `EEK` - Estonian Kroon * `ETB` - Ethiopian Birr * `EUR` - Euro * `XBA` - European Composite Unit * `XEU` - European Currency Unit * `XBB` - European Monetary Unit * `XBC` - European Unit of Account (XBC) * `XBD` - European Unit of Account (XBD) * `FKP` - Falkland Islands Pound * `FJD` - Fijian Dollar * `FIM` - Finnish Markka * `FRF` - French Franc * `XFO` - French Gold Franc * `XFU` - French UIC-Franc * `GMD` - Gambian Dalasi * `GEK` - Georgian Kupon Larit * `GEL` - Georgian Lari * `DEM` - German Mark * `GHS` - Ghanaian Cedi * `GHC` - Ghanaian Cedi (1979–2007) * `GIP` - Gibraltar Pound * `XAU` - Gold * `GRD` - Greek Drachma * `GTQ` - Guatemalan Quetzal * `GWP` - Guinea-Bissau Peso * `GNF` - Guinean Franc * `GNS` - Guinean Syli * `GYD` - Guyanaese Dollar * `HTG` - Haitian Gourde * `HNL` - Honduran Lempira * `HKD` - Hong Kong Dollar * `HUF` - Hungarian Forint * `IMP` - IMP * `ISK` - Icelandic Króna * `ISJ` - Icelandic Króna (1918–1981) * `INR` - Indian Rupee * `IDR` - Indonesian Rupiah * `IRR` - Iranian Rial * `IQD` - Iraqi Dinar * `IEP` - Irish Pound * `ILS` - Israeli New Shekel * `ILP` - Israeli Pound * `ILR` - Israeli Shekel (1980–1985) * `ITL` - Italian Lira * `JMD` - Jamaican Dollar * `JPY` - Japanese Yen * `JOD` - Jordanian Dinar * `KZT` - Kazakhstani Tenge * `KES` - Kenyan Shilling * `KWD` - Kuwaiti Dinar * `KGS` - Kyrgystani Som * `LAK` - Laotian Kip * `LVL` - Latvian Lats * `LVR` - Latvian Ruble * `LBP` - Lebanese Pound * `LSL` - Lesotho Loti * `LRD` - Liberian Dollar * `LYD` - Libyan Dinar * `LTL` - Lithuanian Litas * `LTT` - Lithuanian Talonas * `LUL` - Luxembourg Financial Franc * `LUC` - Luxembourgian Convertible Franc * `LUF` - Luxembourgian Franc * `MOP` - Macanese Pataca * `MKD` - Macedonian Denar * `MKN` - Macedonian Denar (1992–1993) * `MGA` - Malagasy Ariary * `MGF` - Malagasy Franc * `MWK` - Malawian Kwacha * `MYR` - Malaysian Ringgit * `MVR` - Maldivian Rufiyaa * `MVP` - Maldivian Rupee (1947–1981) * `MLF` - Malian Franc * `MTL` - Maltese Lira * `MTP` - Maltese Pound * `MRU` - Mauritanian Ouguiya * `MRO` - Mauritanian Ouguiya (1973–2017) * `MUR` - Mauritian Rupee * `MXV` - Mexican Investment Unit * `MXN` - Mexican Peso * `MXP` - Mexican Silver Peso (1861–1992) * `MDC` - Moldovan Cupon * `MDL` - Moldovan Leu * `MCF` - Monegasque Franc * `MNT` - Mongolian Tugrik * `MAD` - Moroccan Dirham * `MAF` - Moroccan Franc * `MZE` - Mozambican Escudo * `MZN` - Mozambican Metical * `MZM` - Mozambican Metical (1980–2006) * `MMK` - Myanmar Kyat * `NAD` - Namibian Dollar * `NPR` - Nepalese Rupee * `ANG` - Netherlands Antillean Guilder * `TWD` - New Taiwan Dollar * `NZD` - New Zealand Dollar * `NIO` - Nicaraguan Córdoba * `NIC` - Nicaraguan Córdoba (1988–1991) * `NGN` - Nigerian Naira * `KPW` - North Korean Won * `NOK` - Norwegian Krone * `OMR` - Omani Rial * `PKR` - Pakistani Rupee * `XPD` - Palladium * `PAB` - Panamanian Balboa * `PGK` - Papua New Guinean Kina * `PYG` - Paraguayan Guarani * `PEI` - Peruvian Inti * `PEN` - Peruvian Sol * `PES` - Peruvian Sol (1863–1965) * `PHP` - Philippine Peso * `XPT` - Platinum * `PLN` - Polish Zloty * `PLZ` - Polish Zloty (1950–1995) * `PTE` - Portuguese Escudo * `GWE` - Portuguese Guinea Escudo * `QAR` - Qatari Rial * `XRE` - RINET Funds * `RHD` - Rhodesian Dollar * `RON` - Romanian Leu * `ROL` - Romanian Leu (1952–2006) * `RUB` - Russian Ruble * `RUR` - Russian Ruble (1991–1998) * `RWF` - Rwandan Franc * `SVC` - Salvadoran Colón * `WST` - Samoan Tala * `SAR` - Saudi Riyal * `RSD` - Serbian Dinar * `CSD` - Serbian Dinar (2002–2006) * `SCR` - Seychellois Rupee * `SLL` - Sierra Leonean Leone * `XAG` - Silver * `SGD` - Singapore Dollar * `SKK` - Slovak Koruna * `SIT` - Slovenian Tolar * `SBD` - Solomon Islands Dollar * `SOS` - Somali Shilling * `ZAR` - South African Rand * `ZAL` - South African Rand (financial) * `KRH` - South Korean Hwan (1953–1962) * `KRW` - South Korean Won * `KRO` - South Korean Won (1945–1953) * `SSP` - South Sudanese Pound * `SUR` - Soviet Rouble * `ESP` - Spanish Peseta * `ESA` - Spanish Peseta (A account) * `ESB` - Spanish Peseta (convertible account) * `XDR` - Special Drawing Rights * `LKR` - Sri Lankan Rupee * `SHP` - St. Helena Pound * `XSU` - Sucre * `SDD` - Sudanese Dinar (1992–2007) * `SDG` - Sudanese Pound * `SDP` - Sudanese Pound (1957–1998) * `SRD` - Surinamese Dollar * `SRG` - Surinamese Guilder * `SZL` - Swazi Lilangeni * `SEK` - Swedish Krona * `CHF` - Swiss Franc * `SYP` - Syrian Pound * `STN` - São Tomé & Príncipe Dobra * `STD` - São Tomé & Príncipe Dobra (1977–2017) * `TVD` - TVD * `TJR` - Tajikistani Ruble * `TJS` - Tajikistani Somoni * `TZS` - Tanzanian Shilling * `XTS` - Testing Currency Code * `THB` - Thai Baht * `XXX` - The codes assigned for transactions where no currency is involved * `TPE` - Timorese Escudo * `TOP` - Tongan Paʻanga * `TTD` - Trinidad & Tobago Dollar * `TND` - Tunisian Dinar * `TRY` - Turkish Lira * `TRL` - Turkish Lira (1922–2005) * `TMT` - Turkmenistani Manat * `TMM` - Turkmenistani Manat (1993–2009) * `USD` - US Dollar * `USN` - US Dollar (Next day) * `USS` - US Dollar (Same day) * `UGX` - Ugandan Shilling * `UGS` - Ugandan Shilling (1966–1987) * `UAH` - Ukrainian Hryvnia * `UAK` - Ukrainian Karbovanets * `AED` - United Arab Emirates Dirham * `UYW` - Uruguayan Nominal Wage Index Unit * `UYU` - Uruguayan Peso * `UYP` - Uruguayan Peso (1975–1993) * `UYI` - Uruguayan Peso (Indexed Units) * `UZS` - Uzbekistani Som * `VUV` - Vanuatu Vatu * `VES` - Venezuelan Bolívar * `VEB` - Venezuelan Bolívar (1871–2008) * `VEF` - Venezuelan Bolívar (2008–2018) * `VND` - Vietnamese Dong * `VNN` - Vietnamese Dong (1978–1985) * `CHE` - WIR Euro * `CHW` - WIR Franc * `XOF` - West African CFA Franc * `YDD` - Yemeni Dinar * `YER` - Yemeni Rial * `YUN` - Yugoslavian Convertible Dinar (1990–1992) * `YUD` - Yugoslavian Hard Dinar (1966–1990) * `YUM` - Yugoslavian New Dinar (1994–2002) * `YUR` - Yugoslavian Reformed Dinar (1992–1993) * `ZWN` - ZWN * `ZRN` - Zairean New Zaire (1993–1998) * `ZRZ` - Zairean Zaire (1971–1993) * `ZMW` - Zambian Kwacha * `ZMK` - Zambian Kwacha (1968–2012) * `ZWD` - Zimbabwean Dollar (1980–2008) * `ZWR` - Zimbabwean Dollar (2008) * `ZWL` - Zimbabwean Dollar (2009)
|
42
35
|
attr_accessor :currency
|
43
36
|
|
37
|
+
# The journal entry's exchange rate.
|
38
|
+
attr_accessor :exchange_rate
|
39
|
+
|
40
|
+
# The company the journal entry belongs to.
|
41
|
+
attr_accessor :company
|
42
|
+
|
44
43
|
attr_accessor :lines
|
45
44
|
|
46
45
|
attr_accessor :remote_was_deleted
|
47
46
|
|
47
|
+
# The journal's posting status. * `UNPOSTED` - UNPOSTED * `POSTED` - POSTED
|
48
|
+
attr_accessor :posting_status
|
49
|
+
|
50
|
+
attr_accessor :id
|
51
|
+
|
52
|
+
# The third-party API ID of the matching object.
|
53
|
+
attr_accessor :remote_id
|
54
|
+
|
55
|
+
attr_accessor :field_mappings
|
56
|
+
|
57
|
+
attr_accessor :remote_data
|
58
|
+
|
48
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
49
60
|
def self.attribute_map
|
50
61
|
{
|
51
|
-
:'id' => :'id',
|
52
|
-
:'remote_id' => :'remote_id',
|
53
|
-
:'remote_data' => :'remote_data',
|
54
62
|
:'transaction_date' => :'transaction_date',
|
55
63
|
:'remote_created_at' => :'remote_created_at',
|
56
64
|
:'remote_updated_at' => :'remote_updated_at',
|
57
65
|
:'payments' => :'payments',
|
58
66
|
:'memo' => :'memo',
|
59
67
|
:'currency' => :'currency',
|
68
|
+
:'exchange_rate' => :'exchange_rate',
|
69
|
+
:'company' => :'company',
|
60
70
|
:'lines' => :'lines',
|
61
|
-
:'remote_was_deleted' => :'remote_was_deleted'
|
71
|
+
:'remote_was_deleted' => :'remote_was_deleted',
|
72
|
+
:'posting_status' => :'posting_status',
|
73
|
+
:'id' => :'id',
|
74
|
+
:'remote_id' => :'remote_id',
|
75
|
+
:'field_mappings' => :'field_mappings',
|
76
|
+
:'remote_data' => :'remote_data'
|
62
77
|
}
|
63
78
|
end
|
64
79
|
|
@@ -70,30 +85,38 @@ module MergeAccountingClient
|
|
70
85
|
# Attribute type mapping.
|
71
86
|
def self.openapi_types
|
72
87
|
{
|
73
|
-
:'id' => :'String',
|
74
|
-
:'remote_id' => :'String',
|
75
|
-
:'remote_data' => :'Array<RemoteData>',
|
76
88
|
:'transaction_date' => :'Time',
|
77
89
|
:'remote_created_at' => :'Time',
|
78
90
|
:'remote_updated_at' => :'Time',
|
79
91
|
:'payments' => :'Array<String>',
|
80
92
|
:'memo' => :'String',
|
81
93
|
:'currency' => :'CurrencyEnum',
|
94
|
+
:'exchange_rate' => :'String',
|
95
|
+
:'company' => :'String',
|
82
96
|
:'lines' => :'Array<JournalLine>',
|
83
|
-
:'remote_was_deleted' => :'Boolean'
|
97
|
+
:'remote_was_deleted' => :'Boolean',
|
98
|
+
:'posting_status' => :'PostingStatusEnum',
|
99
|
+
:'id' => :'String',
|
100
|
+
:'remote_id' => :'String',
|
101
|
+
:'field_mappings' => :'Hash<String, Object>',
|
102
|
+
:'remote_data' => :'Array<RemoteData>'
|
84
103
|
}
|
85
104
|
end
|
86
105
|
|
87
106
|
# List of attributes with nullable: true
|
88
107
|
def self.openapi_nullable
|
89
108
|
Set.new([
|
90
|
-
:'remote_id',
|
91
|
-
:'remote_data',
|
92
109
|
:'transaction_date',
|
93
110
|
:'remote_created_at',
|
94
111
|
:'remote_updated_at',
|
95
112
|
:'memo',
|
96
113
|
:'currency',
|
114
|
+
:'exchange_rate',
|
115
|
+
:'company',
|
116
|
+
:'posting_status',
|
117
|
+
:'remote_id',
|
118
|
+
:'field_mappings',
|
119
|
+
:'remote_data'
|
97
120
|
])
|
98
121
|
end
|
99
122
|
|
@@ -112,20 +135,6 @@ module MergeAccountingClient
|
|
112
135
|
h[k.to_sym] = v
|
113
136
|
}
|
114
137
|
|
115
|
-
if attributes.key?(:'id')
|
116
|
-
self.id = attributes[:'id']
|
117
|
-
end
|
118
|
-
|
119
|
-
if attributes.key?(:'remote_id')
|
120
|
-
self.remote_id = attributes[:'remote_id']
|
121
|
-
end
|
122
|
-
|
123
|
-
if attributes.key?(:'remote_data')
|
124
|
-
if (value = attributes[:'remote_data']).is_a?(Array)
|
125
|
-
self.remote_data = value
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
138
|
if attributes.key?(:'transaction_date')
|
130
139
|
self.transaction_date = attributes[:'transaction_date']
|
131
140
|
end
|
@@ -152,6 +161,14 @@ module MergeAccountingClient
|
|
152
161
|
self.currency = attributes[:'currency']
|
153
162
|
end
|
154
163
|
|
164
|
+
if attributes.key?(:'exchange_rate')
|
165
|
+
self.exchange_rate = attributes[:'exchange_rate']
|
166
|
+
end
|
167
|
+
|
168
|
+
if attributes.key?(:'company')
|
169
|
+
self.company = attributes[:'company']
|
170
|
+
end
|
171
|
+
|
155
172
|
if attributes.key?(:'lines')
|
156
173
|
if (value = attributes[:'lines']).is_a?(Array)
|
157
174
|
self.lines = value
|
@@ -161,37 +178,82 @@ module MergeAccountingClient
|
|
161
178
|
if attributes.key?(:'remote_was_deleted')
|
162
179
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
163
180
|
end
|
181
|
+
|
182
|
+
if attributes.key?(:'posting_status')
|
183
|
+
self.posting_status = attributes[:'posting_status']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.key?(:'id')
|
187
|
+
self.id = attributes[:'id']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'remote_id')
|
191
|
+
self.remote_id = attributes[:'remote_id']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.key?(:'field_mappings')
|
195
|
+
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
196
|
+
self.field_mappings = value
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.key?(:'remote_data')
|
201
|
+
if (value = attributes[:'remote_data']).is_a?(Array)
|
202
|
+
self.remote_data = value
|
203
|
+
end
|
204
|
+
end
|
164
205
|
end
|
165
206
|
|
166
207
|
# Show invalid properties with the reasons. Usually used together with valid?
|
167
208
|
# @return Array for valid properties with the reasons
|
168
209
|
def list_invalid_properties
|
169
210
|
invalid_properties = Array.new
|
211
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
212
|
+
if !@exchange_rate.nil? && @exchange_rate !~ pattern
|
213
|
+
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
214
|
+
end
|
215
|
+
|
170
216
|
invalid_properties
|
171
217
|
end
|
172
218
|
|
173
219
|
# Check to see if the all the properties in the model are valid
|
174
220
|
# @return true if the model is valid
|
175
221
|
def valid?
|
222
|
+
return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
176
223
|
true
|
177
224
|
end
|
178
225
|
|
226
|
+
# Custom attribute writer method with validation
|
227
|
+
# @param [Object] exchange_rate Value to be assigned
|
228
|
+
def exchange_rate=(exchange_rate)
|
229
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
230
|
+
if !exchange_rate.nil? && exchange_rate !~ pattern
|
231
|
+
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
232
|
+
end
|
233
|
+
|
234
|
+
@exchange_rate = exchange_rate
|
235
|
+
end
|
236
|
+
|
179
237
|
# Checks equality by comparing each attribute.
|
180
238
|
# @param [Object] Object to be compared
|
181
239
|
def ==(o)
|
182
240
|
return true if self.equal?(o)
|
183
241
|
self.class == o.class &&
|
184
|
-
id == o.id &&
|
185
|
-
remote_id == o.remote_id &&
|
186
|
-
remote_data == o.remote_data &&
|
187
242
|
transaction_date == o.transaction_date &&
|
188
243
|
remote_created_at == o.remote_created_at &&
|
189
244
|
remote_updated_at == o.remote_updated_at &&
|
190
245
|
payments == o.payments &&
|
191
246
|
memo == o.memo &&
|
192
247
|
currency == o.currency &&
|
248
|
+
exchange_rate == o.exchange_rate &&
|
249
|
+
company == o.company &&
|
193
250
|
lines == o.lines &&
|
194
|
-
remote_was_deleted == o.remote_was_deleted
|
251
|
+
remote_was_deleted == o.remote_was_deleted &&
|
252
|
+
posting_status == o.posting_status &&
|
253
|
+
id == o.id &&
|
254
|
+
remote_id == o.remote_id &&
|
255
|
+
field_mappings == o.field_mappings &&
|
256
|
+
remote_data == o.remote_data
|
195
257
|
end
|
196
258
|
|
197
259
|
# @see the `==` method
|
@@ -203,7 +265,7 @@ module MergeAccountingClient
|
|
203
265
|
# Calculates hash code according to all attributes.
|
204
266
|
# @return [Integer] Hash code
|
205
267
|
def hash
|
206
|
-
[
|
268
|
+
[transaction_date, remote_created_at, remote_updated_at, payments, memo, currency, exchange_rate, company, lines, remote_was_deleted, posting_status, id, remote_id, field_mappings, remote_data].hash
|
207
269
|
end
|
208
270
|
|
209
271
|
# Builds the object from hash
|
@@ -14,39 +14,48 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeAccountingClient
|
17
|
-
# # The JournalEntry Object ### Description The `JournalEntry` object is used to
|
17
|
+
# # The JournalEntry Object ### Description The `JournalEntry` object is used to get a record of all manually created entries made in a company’s general ledger. The journal line items for each journal entry should sum to zero. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
|
18
18
|
class JournalEntryRequest
|
19
|
-
# The third-party API ID of the matching object.
|
20
|
-
attr_accessor :remote_id
|
21
|
-
|
22
19
|
# The journal entry's transaction date.
|
23
20
|
attr_accessor :transaction_date
|
24
21
|
|
25
|
-
# When the third party's journal entry was created.
|
26
|
-
attr_accessor :remote_created_at
|
27
|
-
|
28
|
-
# When the third party's journal entry was updated.
|
29
|
-
attr_accessor :remote_updated_at
|
30
|
-
|
31
22
|
# Array of `Payment` object IDs.
|
32
23
|
attr_accessor :payments
|
33
24
|
|
34
25
|
# The journal entry's private note.
|
35
26
|
attr_accessor :memo
|
36
27
|
|
37
|
-
# The journal's currency.
|
28
|
+
# The journal's currency. * `XUA` - ADB Unit of Account * `AFN` - Afghan Afghani * `AFA` - Afghan Afghani (1927–2002) * `ALL` - Albanian Lek * `ALK` - Albanian Lek (1946–1965) * `DZD` - Algerian Dinar * `ADP` - Andorran Peseta * `AOA` - Angolan Kwanza * `AOK` - Angolan Kwanza (1977–1991) * `AON` - Angolan New Kwanza (1990–2000) * `AOR` - Angolan Readjusted Kwanza (1995–1999) * `ARA` - Argentine Austral * `ARS` - Argentine Peso * `ARM` - Argentine Peso (1881–1970) * `ARP` - Argentine Peso (1983–1985) * `ARL` - Argentine Peso Ley (1970–1983) * `AMD` - Armenian Dram * `AWG` - Aruban Florin * `AUD` - Australian Dollar * `ATS` - Austrian Schilling * `AZN` - Azerbaijani Manat * `AZM` - Azerbaijani Manat (1993–2006) * `BSD` - Bahamian Dollar * `BHD` - Bahraini Dinar * `BDT` - Bangladeshi Taka * `BBD` - Barbadian Dollar * `BYN` - Belarusian Ruble * `BYB` - Belarusian Ruble (1994–1999) * `BYR` - Belarusian Ruble (2000–2016) * `BEF` - Belgian Franc * `BEC` - Belgian Franc (convertible) * `BEL` - Belgian Franc (financial) * `BZD` - Belize Dollar * `BMD` - Bermudan Dollar * `BTN` - Bhutanese Ngultrum * `BOB` - Bolivian Boliviano * `BOL` - Bolivian Boliviano (1863–1963) * `BOV` - Bolivian Mvdol * `BOP` - Bolivian Peso * `BAM` - Bosnia-Herzegovina Convertible Mark * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) * `BWP` - Botswanan Pula * `BRC` - Brazilian Cruzado (1986–1989) * `BRZ` - Brazilian Cruzeiro (1942–1967) * `BRE` - Brazilian Cruzeiro (1990–1993) * `BRR` - Brazilian Cruzeiro (1993–1994) * `BRN` - Brazilian New Cruzado (1989–1990) * `BRB` - Brazilian New Cruzeiro (1967–1986) * `BRL` - Brazilian Real * `GBP` - British Pound * `BND` - Brunei Dollar * `BGL` - Bulgarian Hard Lev * `BGN` - Bulgarian Lev * `BGO` - Bulgarian Lev (1879–1952) * `BGM` - Bulgarian Socialist Lev * `BUK` - Burmese Kyat * `BIF` - Burundian Franc * `XPF` - CFP Franc * `KHR` - Cambodian Riel * `CAD` - Canadian Dollar * `CVE` - Cape Verdean Escudo * `KYD` - Cayman Islands Dollar * `XAF` - Central African CFA Franc * `CLE` - Chilean Escudo * `CLP` - Chilean Peso * `CLF` - Chilean Unit of Account (UF) * `CNX` - Chinese People’s Bank Dollar * `CNY` - Chinese Yuan * `CNH` - Chinese Yuan (offshore) * `COP` - Colombian Peso * `COU` - Colombian Real Value Unit * `KMF` - Comorian Franc * `CDF` - Congolese Franc * `CRC` - Costa Rican Colón * `HRD` - Croatian Dinar * `HRK` - Croatian Kuna * `CUC` - Cuban Convertible Peso * `CUP` - Cuban Peso * `CYP` - Cypriot Pound * `CZK` - Czech Koruna * `CSK` - Czechoslovak Hard Koruna * `DKK` - Danish Krone * `DJF` - Djiboutian Franc * `DOP` - Dominican Peso * `NLG` - Dutch Guilder * `XCD` - East Caribbean Dollar * `DDM` - East German Mark * `ECS` - Ecuadorian Sucre * `ECV` - Ecuadorian Unit of Constant Value * `EGP` - Egyptian Pound * `GQE` - Equatorial Guinean Ekwele * `ERN` - Eritrean Nakfa * `EEK` - Estonian Kroon * `ETB` - Ethiopian Birr * `EUR` - Euro * `XBA` - European Composite Unit * `XEU` - European Currency Unit * `XBB` - European Monetary Unit * `XBC` - European Unit of Account (XBC) * `XBD` - European Unit of Account (XBD) * `FKP` - Falkland Islands Pound * `FJD` - Fijian Dollar * `FIM` - Finnish Markka * `FRF` - French Franc * `XFO` - French Gold Franc * `XFU` - French UIC-Franc * `GMD` - Gambian Dalasi * `GEK` - Georgian Kupon Larit * `GEL` - Georgian Lari * `DEM` - German Mark * `GHS` - Ghanaian Cedi * `GHC` - Ghanaian Cedi (1979–2007) * `GIP` - Gibraltar Pound * `XAU` - Gold * `GRD` - Greek Drachma * `GTQ` - Guatemalan Quetzal * `GWP` - Guinea-Bissau Peso * `GNF` - Guinean Franc * `GNS` - Guinean Syli * `GYD` - Guyanaese Dollar * `HTG` - Haitian Gourde * `HNL` - Honduran Lempira * `HKD` - Hong Kong Dollar * `HUF` - Hungarian Forint * `IMP` - IMP * `ISK` - Icelandic Króna * `ISJ` - Icelandic Króna (1918–1981) * `INR` - Indian Rupee * `IDR` - Indonesian Rupiah * `IRR` - Iranian Rial * `IQD` - Iraqi Dinar * `IEP` - Irish Pound * `ILS` - Israeli New Shekel * `ILP` - Israeli Pound * `ILR` - Israeli Shekel (1980–1985) * `ITL` - Italian Lira * `JMD` - Jamaican Dollar * `JPY` - Japanese Yen * `JOD` - Jordanian Dinar * `KZT` - Kazakhstani Tenge * `KES` - Kenyan Shilling * `KWD` - Kuwaiti Dinar * `KGS` - Kyrgystani Som * `LAK` - Laotian Kip * `LVL` - Latvian Lats * `LVR` - Latvian Ruble * `LBP` - Lebanese Pound * `LSL` - Lesotho Loti * `LRD` - Liberian Dollar * `LYD` - Libyan Dinar * `LTL` - Lithuanian Litas * `LTT` - Lithuanian Talonas * `LUL` - Luxembourg Financial Franc * `LUC` - Luxembourgian Convertible Franc * `LUF` - Luxembourgian Franc * `MOP` - Macanese Pataca * `MKD` - Macedonian Denar * `MKN` - Macedonian Denar (1992–1993) * `MGA` - Malagasy Ariary * `MGF` - Malagasy Franc * `MWK` - Malawian Kwacha * `MYR` - Malaysian Ringgit * `MVR` - Maldivian Rufiyaa * `MVP` - Maldivian Rupee (1947–1981) * `MLF` - Malian Franc * `MTL` - Maltese Lira * `MTP` - Maltese Pound * `MRU` - Mauritanian Ouguiya * `MRO` - Mauritanian Ouguiya (1973–2017) * `MUR` - Mauritian Rupee * `MXV` - Mexican Investment Unit * `MXN` - Mexican Peso * `MXP` - Mexican Silver Peso (1861–1992) * `MDC` - Moldovan Cupon * `MDL` - Moldovan Leu * `MCF` - Monegasque Franc * `MNT` - Mongolian Tugrik * `MAD` - Moroccan Dirham * `MAF` - Moroccan Franc * `MZE` - Mozambican Escudo * `MZN` - Mozambican Metical * `MZM` - Mozambican Metical (1980–2006) * `MMK` - Myanmar Kyat * `NAD` - Namibian Dollar * `NPR` - Nepalese Rupee * `ANG` - Netherlands Antillean Guilder * `TWD` - New Taiwan Dollar * `NZD` - New Zealand Dollar * `NIO` - Nicaraguan Córdoba * `NIC` - Nicaraguan Córdoba (1988–1991) * `NGN` - Nigerian Naira * `KPW` - North Korean Won * `NOK` - Norwegian Krone * `OMR` - Omani Rial * `PKR` - Pakistani Rupee * `XPD` - Palladium * `PAB` - Panamanian Balboa * `PGK` - Papua New Guinean Kina * `PYG` - Paraguayan Guarani * `PEI` - Peruvian Inti * `PEN` - Peruvian Sol * `PES` - Peruvian Sol (1863–1965) * `PHP` - Philippine Peso * `XPT` - Platinum * `PLN` - Polish Zloty * `PLZ` - Polish Zloty (1950–1995) * `PTE` - Portuguese Escudo * `GWE` - Portuguese Guinea Escudo * `QAR` - Qatari Rial * `XRE` - RINET Funds * `RHD` - Rhodesian Dollar * `RON` - Romanian Leu * `ROL` - Romanian Leu (1952–2006) * `RUB` - Russian Ruble * `RUR` - Russian Ruble (1991–1998) * `RWF` - Rwandan Franc * `SVC` - Salvadoran Colón * `WST` - Samoan Tala * `SAR` - Saudi Riyal * `RSD` - Serbian Dinar * `CSD` - Serbian Dinar (2002–2006) * `SCR` - Seychellois Rupee * `SLL` - Sierra Leonean Leone * `XAG` - Silver * `SGD` - Singapore Dollar * `SKK` - Slovak Koruna * `SIT` - Slovenian Tolar * `SBD` - Solomon Islands Dollar * `SOS` - Somali Shilling * `ZAR` - South African Rand * `ZAL` - South African Rand (financial) * `KRH` - South Korean Hwan (1953–1962) * `KRW` - South Korean Won * `KRO` - South Korean Won (1945–1953) * `SSP` - South Sudanese Pound * `SUR` - Soviet Rouble * `ESP` - Spanish Peseta * `ESA` - Spanish Peseta (A account) * `ESB` - Spanish Peseta (convertible account) * `XDR` - Special Drawing Rights * `LKR` - Sri Lankan Rupee * `SHP` - St. Helena Pound * `XSU` - Sucre * `SDD` - Sudanese Dinar (1992–2007) * `SDG` - Sudanese Pound * `SDP` - Sudanese Pound (1957–1998) * `SRD` - Surinamese Dollar * `SRG` - Surinamese Guilder * `SZL` - Swazi Lilangeni * `SEK` - Swedish Krona * `CHF` - Swiss Franc * `SYP` - Syrian Pound * `STN` - São Tomé & Príncipe Dobra * `STD` - São Tomé & Príncipe Dobra (1977–2017) * `TVD` - TVD * `TJR` - Tajikistani Ruble * `TJS` - Tajikistani Somoni * `TZS` - Tanzanian Shilling * `XTS` - Testing Currency Code * `THB` - Thai Baht * `XXX` - The codes assigned for transactions where no currency is involved * `TPE` - Timorese Escudo * `TOP` - Tongan Paʻanga * `TTD` - Trinidad & Tobago Dollar * `TND` - Tunisian Dinar * `TRY` - Turkish Lira * `TRL` - Turkish Lira (1922–2005) * `TMT` - Turkmenistani Manat * `TMM` - Turkmenistani Manat (1993–2009) * `USD` - US Dollar * `USN` - US Dollar (Next day) * `USS` - US Dollar (Same day) * `UGX` - Ugandan Shilling * `UGS` - Ugandan Shilling (1966–1987) * `UAH` - Ukrainian Hryvnia * `UAK` - Ukrainian Karbovanets * `AED` - United Arab Emirates Dirham * `UYW` - Uruguayan Nominal Wage Index Unit * `UYU` - Uruguayan Peso * `UYP` - Uruguayan Peso (1975–1993) * `UYI` - Uruguayan Peso (Indexed Units) * `UZS` - Uzbekistani Som * `VUV` - Vanuatu Vatu * `VES` - Venezuelan Bolívar * `VEB` - Venezuelan Bolívar (1871–2008) * `VEF` - Venezuelan Bolívar (2008–2018) * `VND` - Vietnamese Dong * `VNN` - Vietnamese Dong (1978–1985) * `CHE` - WIR Euro * `CHW` - WIR Franc * `XOF` - West African CFA Franc * `YDD` - Yemeni Dinar * `YER` - Yemeni Rial * `YUN` - Yugoslavian Convertible Dinar (1990–1992) * `YUD` - Yugoslavian Hard Dinar (1966–1990) * `YUM` - Yugoslavian New Dinar (1994–2002) * `YUR` - Yugoslavian Reformed Dinar (1992–1993) * `ZWN` - ZWN * `ZRN` - Zairean New Zaire (1993–1998) * `ZRZ` - Zairean Zaire (1971–1993) * `ZMW` - Zambian Kwacha * `ZMK` - Zambian Kwacha (1968–2012) * `ZWD` - Zimbabwean Dollar (1980–2008) * `ZWR` - Zimbabwean Dollar (2008) * `ZWL` - Zimbabwean Dollar (2009)
|
38
29
|
attr_accessor :currency
|
39
30
|
|
31
|
+
# The journal entry's exchange rate.
|
32
|
+
attr_accessor :exchange_rate
|
33
|
+
|
34
|
+
# The company the journal entry belongs to.
|
35
|
+
attr_accessor :company
|
36
|
+
|
37
|
+
attr_accessor :lines
|
38
|
+
|
39
|
+
# The journal's posting status. * `UNPOSTED` - UNPOSTED * `POSTED` - POSTED
|
40
|
+
attr_accessor :posting_status
|
41
|
+
|
42
|
+
attr_accessor :integration_params
|
43
|
+
|
44
|
+
attr_accessor :linked_account_params
|
45
|
+
|
40
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
47
|
def self.attribute_map
|
42
48
|
{
|
43
|
-
:'remote_id' => :'remote_id',
|
44
49
|
:'transaction_date' => :'transaction_date',
|
45
|
-
:'remote_created_at' => :'remote_created_at',
|
46
|
-
:'remote_updated_at' => :'remote_updated_at',
|
47
50
|
:'payments' => :'payments',
|
48
51
|
:'memo' => :'memo',
|
49
|
-
:'currency' => :'currency'
|
52
|
+
:'currency' => :'currency',
|
53
|
+
:'exchange_rate' => :'exchange_rate',
|
54
|
+
:'company' => :'company',
|
55
|
+
:'lines' => :'lines',
|
56
|
+
:'posting_status' => :'posting_status',
|
57
|
+
:'integration_params' => :'integration_params',
|
58
|
+
:'linked_account_params' => :'linked_account_params'
|
50
59
|
}
|
51
60
|
end
|
52
61
|
|
@@ -58,25 +67,30 @@ module MergeAccountingClient
|
|
58
67
|
# Attribute type mapping.
|
59
68
|
def self.openapi_types
|
60
69
|
{
|
61
|
-
:'remote_id' => :'String',
|
62
70
|
:'transaction_date' => :'Time',
|
63
|
-
:'remote_created_at' => :'Time',
|
64
|
-
:'remote_updated_at' => :'Time',
|
65
71
|
:'payments' => :'Array<String>',
|
66
72
|
:'memo' => :'String',
|
67
|
-
:'currency' => :'CurrencyEnum'
|
73
|
+
:'currency' => :'CurrencyEnum',
|
74
|
+
:'exchange_rate' => :'String',
|
75
|
+
:'company' => :'String',
|
76
|
+
:'lines' => :'Array<JournalLineRequest>',
|
77
|
+
:'posting_status' => :'PostingStatusEnum',
|
78
|
+
:'integration_params' => :'Hash<String, Object>',
|
79
|
+
:'linked_account_params' => :'Hash<String, Object>'
|
68
80
|
}
|
69
81
|
end
|
70
82
|
|
71
83
|
# List of attributes with nullable: true
|
72
84
|
def self.openapi_nullable
|
73
85
|
Set.new([
|
74
|
-
:'remote_id',
|
75
86
|
:'transaction_date',
|
76
|
-
:'remote_created_at',
|
77
|
-
:'remote_updated_at',
|
78
87
|
:'memo',
|
79
|
-
:'currency'
|
88
|
+
:'currency',
|
89
|
+
:'exchange_rate',
|
90
|
+
:'company',
|
91
|
+
:'posting_status',
|
92
|
+
:'integration_params',
|
93
|
+
:'linked_account_params'
|
80
94
|
])
|
81
95
|
end
|
82
96
|
|
@@ -95,22 +109,10 @@ module MergeAccountingClient
|
|
95
109
|
h[k.to_sym] = v
|
96
110
|
}
|
97
111
|
|
98
|
-
if attributes.key?(:'remote_id')
|
99
|
-
self.remote_id = attributes[:'remote_id']
|
100
|
-
end
|
101
|
-
|
102
112
|
if attributes.key?(:'transaction_date')
|
103
113
|
self.transaction_date = attributes[:'transaction_date']
|
104
114
|
end
|
105
115
|
|
106
|
-
if attributes.key?(:'remote_created_at')
|
107
|
-
self.remote_created_at = attributes[:'remote_created_at']
|
108
|
-
end
|
109
|
-
|
110
|
-
if attributes.key?(:'remote_updated_at')
|
111
|
-
self.remote_updated_at = attributes[:'remote_updated_at']
|
112
|
-
end
|
113
|
-
|
114
116
|
if attributes.key?(:'payments')
|
115
117
|
if (value = attributes[:'payments']).is_a?(Array)
|
116
118
|
self.payments = value
|
@@ -124,33 +126,83 @@ module MergeAccountingClient
|
|
124
126
|
if attributes.key?(:'currency')
|
125
127
|
self.currency = attributes[:'currency']
|
126
128
|
end
|
129
|
+
|
130
|
+
if attributes.key?(:'exchange_rate')
|
131
|
+
self.exchange_rate = attributes[:'exchange_rate']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'company')
|
135
|
+
self.company = attributes[:'company']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'lines')
|
139
|
+
if (value = attributes[:'lines']).is_a?(Array)
|
140
|
+
self.lines = value
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'posting_status')
|
145
|
+
self.posting_status = attributes[:'posting_status']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'integration_params')
|
149
|
+
if (value = attributes[:'integration_params']).is_a?(Hash)
|
150
|
+
self.integration_params = value
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'linked_account_params')
|
155
|
+
if (value = attributes[:'linked_account_params']).is_a?(Hash)
|
156
|
+
self.linked_account_params = value
|
157
|
+
end
|
158
|
+
end
|
127
159
|
end
|
128
160
|
|
129
161
|
# Show invalid properties with the reasons. Usually used together with valid?
|
130
162
|
# @return Array for valid properties with the reasons
|
131
163
|
def list_invalid_properties
|
132
164
|
invalid_properties = Array.new
|
165
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
166
|
+
if !@exchange_rate.nil? && @exchange_rate !~ pattern
|
167
|
+
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
168
|
+
end
|
169
|
+
|
133
170
|
invalid_properties
|
134
171
|
end
|
135
172
|
|
136
173
|
# Check to see if the all the properties in the model are valid
|
137
174
|
# @return true if the model is valid
|
138
175
|
def valid?
|
176
|
+
return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
139
177
|
true
|
140
178
|
end
|
141
179
|
|
180
|
+
# Custom attribute writer method with validation
|
181
|
+
# @param [Object] exchange_rate Value to be assigned
|
182
|
+
def exchange_rate=(exchange_rate)
|
183
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
184
|
+
if !exchange_rate.nil? && exchange_rate !~ pattern
|
185
|
+
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
186
|
+
end
|
187
|
+
|
188
|
+
@exchange_rate = exchange_rate
|
189
|
+
end
|
190
|
+
|
142
191
|
# Checks equality by comparing each attribute.
|
143
192
|
# @param [Object] Object to be compared
|
144
193
|
def ==(o)
|
145
194
|
return true if self.equal?(o)
|
146
195
|
self.class == o.class &&
|
147
|
-
remote_id == o.remote_id &&
|
148
196
|
transaction_date == o.transaction_date &&
|
149
|
-
remote_created_at == o.remote_created_at &&
|
150
|
-
remote_updated_at == o.remote_updated_at &&
|
151
197
|
payments == o.payments &&
|
152
198
|
memo == o.memo &&
|
153
|
-
currency == o.currency
|
199
|
+
currency == o.currency &&
|
200
|
+
exchange_rate == o.exchange_rate &&
|
201
|
+
company == o.company &&
|
202
|
+
lines == o.lines &&
|
203
|
+
posting_status == o.posting_status &&
|
204
|
+
integration_params == o.integration_params &&
|
205
|
+
linked_account_params == o.linked_account_params
|
154
206
|
end
|
155
207
|
|
156
208
|
# @see the `==` method
|
@@ -162,7 +214,7 @@ module MergeAccountingClient
|
|
162
214
|
# Calculates hash code according to all attributes.
|
163
215
|
# @return [Integer] Hash code
|
164
216
|
def hash
|
165
|
-
[
|
217
|
+
[transaction_date, payments, memo, currency, exchange_rate, company, lines, posting_status, integration_params, linked_account_params].hash
|
166
218
|
end
|
167
219
|
|
168
220
|
# Builds the object from hash
|