merge_accounting_client 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +61 -5
  3. data/docs/Account.md +12 -8
  4. data/docs/AccountEndpointRequest.md +18 -0
  5. data/docs/AccountIntegration.md +1 -1
  6. data/docs/AccountRequest.md +40 -0
  7. data/docs/AccountResponse.md +24 -0
  8. data/docs/AccountingAttachment.md +7 -3
  9. data/docs/AccountingAttachmentEndpointRequest.md +18 -0
  10. data/docs/AccountingAttachmentRequest.md +26 -0
  11. data/docs/AccountingAttachmentResponse.md +24 -0
  12. data/docs/AccountingPhoneNumberRequest.md +24 -0
  13. data/docs/AccountsApi.md +163 -5
  14. data/docs/Address.md +5 -3
  15. data/docs/AddressesApi.md +4 -2
  16. data/docs/AttachmentsApi.md +154 -0
  17. data/docs/BalanceSheet.md +11 -7
  18. data/docs/BalanceSheetsApi.md +2 -0
  19. data/docs/CashFlowStatement.md +11 -7
  20. data/docs/CashFlowStatementsApi.md +2 -0
  21. data/docs/CommonModelScopeData.md +20 -0
  22. data/docs/CommonModelScopes.md +20 -0
  23. data/docs/CommonModelScopesApi.md +157 -0
  24. data/docs/CommonModelScopesBodyRequest.md +22 -0
  25. data/docs/CommonModelScopesDisabledModels.md +26 -0
  26. data/docs/CommonModelScopesDisabledModelsEnabledActionsEnum.md +15 -0
  27. data/docs/CommonModelScopesPostInnerDeserializerRequest.md +22 -0
  28. data/docs/CommonModelScopesUpdateSerializer.md +18 -0
  29. data/docs/CompanyInfo.md +6 -4
  30. data/docs/CompanyInfoApi.md +0 -4
  31. data/docs/ConditionSchema.md +30 -0
  32. data/docs/ConditionTypeEnum.md +15 -0
  33. data/docs/Contact.md +8 -4
  34. data/docs/ContactEndpointRequest.md +18 -0
  35. data/docs/ContactRequest.md +40 -0
  36. data/docs/ContactResponse.md +24 -0
  37. data/docs/ContactsApi.md +163 -9
  38. data/docs/CreditNote.md +12 -8
  39. data/docs/CreditNoteLineItem.md +7 -3
  40. data/docs/CreditNotesApi.md +15 -9
  41. data/docs/DataPassthroughRequest.md +1 -1
  42. data/docs/EnabledActionsEnum.md +15 -0
  43. data/docs/EndUserDetailsRequest.md +3 -1
  44. data/docs/Expense.md +18 -12
  45. data/docs/ExpenseEndpointRequest.md +18 -0
  46. data/docs/ExpenseLine.md +11 -5
  47. data/docs/ExpenseLineRequest.md +38 -0
  48. data/docs/ExpenseRequest.md +38 -0
  49. data/docs/ExpenseResponse.md +24 -0
  50. data/docs/ExpensesApi.md +159 -5
  51. data/docs/IncomeStatement.md +15 -11
  52. data/docs/IncomeStatementsApi.md +2 -0
  53. data/docs/Invoice.md +21 -15
  54. data/docs/InvoiceLineItem.md +15 -5
  55. data/docs/InvoiceLineItemRequest.md +15 -3
  56. data/docs/InvoiceRequest.md +17 -11
  57. data/docs/InvoicesApi.md +16 -10
  58. data/docs/Issue.md +9 -7
  59. data/docs/IssuesApi.md +2 -2
  60. data/docs/Item.md +11 -7
  61. data/docs/ItemsApi.md +11 -9
  62. data/docs/JournalEntriesApi.md +7 -5
  63. data/docs/JournalEntry.md +18 -10
  64. data/docs/JournalEntryRequest.md +14 -8
  65. data/docs/JournalLine.md +6 -4
  66. data/docs/JournalLineRequest.md +10 -4
  67. data/docs/LinkToken.md +1 -1
  68. data/docs/LinkedAccountCondition.md +28 -0
  69. data/docs/LinkedAccountConditionRequest.md +22 -0
  70. data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
  71. data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
  72. data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
  73. data/docs/LinkedAccountsApi.md +2 -2
  74. data/docs/MetaResponse.md +2 -0
  75. data/docs/MultipartFormFieldRequest.md +1 -1
  76. data/docs/OperatorSchema.md +20 -0
  77. data/docs/PaginatedConditionSchemaList.md +22 -0
  78. data/docs/Payment.md +14 -6
  79. data/docs/PaymentEndpointRequest.md +18 -0
  80. data/docs/PaymentRequest.md +34 -0
  81. data/docs/PaymentResponse.md +24 -0
  82. data/docs/PaymentsApi.md +159 -5
  83. data/docs/PostingStatusEnum.md +15 -0
  84. data/docs/PurchaseOrder.md +19 -13
  85. data/docs/PurchaseOrderEndpointRequest.md +18 -0
  86. data/docs/PurchaseOrderLineItem.md +10 -2
  87. data/docs/PurchaseOrderLineItemRequest.md +44 -0
  88. data/docs/PurchaseOrderRequest.md +44 -0
  89. data/docs/PurchaseOrderResponse.md +24 -0
  90. data/docs/PurchaseOrdersApi.md +167 -9
  91. data/docs/ReportItem.md +3 -1
  92. data/docs/SelectiveSyncApi.md +233 -0
  93. data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
  94. data/docs/SyncStatus.md +5 -3
  95. data/docs/TaxRate.md +11 -7
  96. data/docs/TaxRatesApi.md +2 -0
  97. data/docs/TrackingCategoriesApi.md +11 -5
  98. data/docs/TrackingCategory.md +13 -9
  99. data/docs/Transaction.md +20 -14
  100. data/docs/TransactionLineItem.md +9 -3
  101. data/docs/TransactionsApi.md +7 -5
  102. data/docs/VendorCredit.md +13 -7
  103. data/docs/VendorCreditLine.md +6 -2
  104. data/docs/VendorCreditsApi.md +7 -5
  105. data/lib/merge_accounting_client/api/accounts_api.rb +159 -4
  106. data/lib/merge_accounting_client/api/addresses_api.rb +9 -2
  107. data/lib/merge_accounting_client/api/attachments_api.rb +141 -0
  108. data/lib/merge_accounting_client/api/balance_sheets_api.rb +3 -0
  109. data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +3 -0
  110. data/lib/merge_accounting_client/api/common_model_scopes_api.rb +146 -0
  111. data/lib/merge_accounting_client/api/company_info_api.rb +0 -14
  112. data/lib/merge_accounting_client/api/contacts_api.rb +159 -18
  113. data/lib/merge_accounting_client/api/credit_notes_api.rb +27 -18
  114. data/lib/merge_accounting_client/api/expenses_api.rb +147 -14
  115. data/lib/merge_accounting_client/api/income_statements_api.rb +3 -0
  116. data/lib/merge_accounting_client/api/invoices_api.rb +29 -20
  117. data/lib/merge_accounting_client/api/issues_api.rb +2 -2
  118. data/lib/merge_accounting_client/api/items_api.rb +21 -18
  119. data/lib/merge_accounting_client/api/journal_entries_api.rb +9 -14
  120. data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -3
  121. data/lib/merge_accounting_client/api/payments_api.rb +147 -14
  122. data/lib/merge_accounting_client/api/purchase_orders_api.rb +165 -18
  123. data/lib/merge_accounting_client/api/selective_sync_api.rb +225 -0
  124. data/lib/merge_accounting_client/api/tax_rates_api.rb +3 -0
  125. data/lib/merge_accounting_client/api/tracking_categories_api.rb +21 -4
  126. data/lib/merge_accounting_client/api/transactions_api.rb +9 -14
  127. data/lib/merge_accounting_client/api/vendor_credits_api.rb +9 -14
  128. data/lib/merge_accounting_client/models/account.rb +45 -21
  129. data/lib/merge_accounting_client/models/account_endpoint_request.rb +223 -0
  130. data/lib/merge_accounting_client/models/account_integration.rb +1 -1
  131. data/lib/merge_accounting_client/models/account_request.rb +344 -0
  132. data/lib/merge_accounting_client/models/account_response.rb +266 -0
  133. data/lib/merge_accounting_client/models/accounting_attachment.rb +39 -16
  134. data/lib/merge_accounting_client/models/accounting_attachment_endpoint_request.rb +223 -0
  135. data/lib/merge_accounting_client/models/accounting_attachment_request.rb +282 -0
  136. data/lib/merge_accounting_client/models/accounting_attachment_response.rb +266 -0
  137. data/lib/merge_accounting_client/models/accounting_phone_number_request.rb +256 -0
  138. data/lib/merge_accounting_client/models/address.rb +16 -5
  139. data/lib/merge_accounting_client/models/balance_sheet.rb +41 -18
  140. data/lib/merge_accounting_client/models/cash_flow_statement.rb +41 -18
  141. data/lib/merge_accounting_client/models/categories_enum.rb +3 -1
  142. data/lib/merge_accounting_client/models/category_enum.rb +3 -1
  143. data/lib/merge_accounting_client/models/common_model_scope_data.rb +234 -0
  144. data/lib/merge_accounting_client/models/common_model_scopes.rb +234 -0
  145. data/lib/merge_accounting_client/models/common_model_scopes_body_request.rb +274 -0
  146. data/lib/merge_accounting_client/models/common_model_scopes_disabled_models.rb +283 -0
  147. data/lib/merge_accounting_client/models/common_model_scopes_disabled_models_enabled_actions_enum.rb +45 -0
  148. data/lib/merge_accounting_client/models/common_model_scopes_post_inner_deserializer_request.rb +274 -0
  149. data/lib/merge_accounting_client/models/common_model_scopes_update_serializer.rb +226 -0
  150. data/lib/merge_accounting_client/models/company_info.rb +29 -17
  151. data/lib/merge_accounting_client/models/condition_schema.rb +298 -0
  152. data/lib/merge_accounting_client/models/condition_type_enum.rb +50 -0
  153. data/lib/merge_accounting_client/models/contact.rb +41 -18
  154. data/lib/merge_accounting_client/models/contact_endpoint_request.rb +223 -0
  155. data/lib/merge_accounting_client/models/contact_request.rb +346 -0
  156. data/lib/merge_accounting_client/models/contact_response.rb +266 -0
  157. data/lib/merge_accounting_client/models/credit_note.rb +43 -20
  158. data/lib/merge_accounting_client/models/credit_note_line_item.rb +40 -12
  159. data/lib/merge_accounting_client/models/data_passthrough_request.rb +1 -0
  160. data/lib/merge_accounting_client/models/enabled_actions_enum.rb +45 -0
  161. data/lib/merge_accounting_client/models/end_user_details_request.rb +18 -5
  162. data/lib/merge_accounting_client/models/expense.rb +91 -38
  163. data/lib/merge_accounting_client/models/expense_endpoint_request.rb +223 -0
  164. data/lib/merge_accounting_client/models/expense_line.rb +51 -17
  165. data/lib/merge_accounting_client/models/expense_line_request.rb +332 -0
  166. data/lib/merge_accounting_client/models/expense_request.rb +350 -0
  167. data/lib/merge_accounting_client/models/expense_response.rb +266 -0
  168. data/lib/merge_accounting_client/models/income_statement.rb +44 -21
  169. data/lib/merge_accounting_client/models/invoice.rb +94 -42
  170. data/lib/merge_accounting_client/models/invoice_line_item.rb +99 -26
  171. data/lib/merge_accounting_client/models/invoice_line_item_request.rb +102 -17
  172. data/lib/merge_accounting_client/models/invoice_request.rb +85 -32
  173. data/lib/merge_accounting_client/models/issue.rb +15 -4
  174. data/lib/merge_accounting_client/models/item.rb +44 -19
  175. data/lib/merge_accounting_client/models/journal_entry.rb +100 -38
  176. data/lib/merge_accounting_client/models/journal_entry_request.rb +92 -40
  177. data/lib/merge_accounting_client/models/journal_line.rb +28 -17
  178. data/lib/merge_accounting_client/models/journal_line_request.rb +52 -17
  179. data/lib/merge_accounting_client/models/link_token.rb +0 -5
  180. data/lib/merge_accounting_client/models/linked_account_condition.rb +282 -0
  181. data/lib/merge_accounting_client/models/linked_account_condition_request.rb +269 -0
  182. data/lib/merge_accounting_client/models/linked_account_selective_sync_configuration.rb +221 -0
  183. data/lib/merge_accounting_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
  184. data/lib/merge_accounting_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
  185. data/lib/merge_accounting_client/models/meta_response.rb +12 -1
  186. data/lib/merge_accounting_client/models/multipart_form_field_request.rb +1 -1
  187. data/lib/merge_accounting_client/models/operator_schema.rb +229 -0
  188. data/lib/merge_accounting_client/models/paginated_condition_schema_list.rb +240 -0
  189. data/lib/merge_accounting_client/models/payment.rb +82 -18
  190. data/lib/merge_accounting_client/models/payment_endpoint_request.rb +223 -0
  191. data/lib/merge_accounting_client/models/payment_request.rb +328 -0
  192. data/lib/merge_accounting_client/models/payment_response.rb +266 -0
  193. data/lib/merge_accounting_client/models/posting_status_enum.rb +45 -0
  194. data/lib/merge_accounting_client/models/purchase_order.rb +92 -41
  195. data/lib/merge_accounting_client/models/purchase_order_endpoint_request.rb +223 -0
  196. data/lib/merge_accounting_client/models/purchase_order_line_item.rb +79 -12
  197. data/lib/merge_accounting_client/models/purchase_order_line_item_request.rb +422 -0
  198. data/lib/merge_accounting_client/models/purchase_order_request.rb +383 -0
  199. data/lib/merge_accounting_client/models/purchase_order_response.rb +266 -0
  200. data/lib/merge_accounting_client/models/report_item.rb +15 -4
  201. data/lib/merge_accounting_client/models/selective_sync_configurations_usage_enum.rb +45 -0
  202. data/lib/merge_accounting_client/models/sync_status.rb +13 -4
  203. data/lib/merge_accounting_client/models/tax_rate.rb +59 -36
  204. data/lib/merge_accounting_client/models/tracking_category.rb +62 -38
  205. data/lib/merge_accounting_client/models/transaction.rb +97 -46
  206. data/lib/merge_accounting_client/models/transaction_line_item.rb +75 -19
  207. data/lib/merge_accounting_client/models/vendor_credit.rb +70 -18
  208. data/lib/merge_accounting_client/models/vendor_credit_line.rb +34 -6
  209. data/lib/merge_accounting_client/version.rb +1 -1
  210. data/lib/merge_accounting_client.rb +42 -1
  211. data/spec/api/accounts_api_spec.rb +30 -2
  212. data/spec/api/addresses_api_spec.rb +2 -1
  213. data/spec/api/attachments_api_spec.rb +26 -0
  214. data/spec/api/balance_sheets_api_spec.rb +1 -0
  215. data/spec/api/cash_flow_statements_api_spec.rb +1 -0
  216. data/spec/api/common_model_scopes_api_spec.rb +58 -0
  217. data/spec/api/company_info_api_spec.rb +0 -2
  218. data/spec/api/contacts_api_spec.rb +30 -4
  219. data/spec/api/credit_notes_api_spec.rb +7 -4
  220. data/spec/api/expenses_api_spec.rb +28 -2
  221. data/spec/api/income_statements_api_spec.rb +1 -0
  222. data/spec/api/invoices_api_spec.rb +8 -5
  223. data/spec/api/issues_api_spec.rb +1 -1
  224. data/spec/api/items_api_spec.rb +5 -4
  225. data/spec/api/journal_entries_api_spec.rb +3 -2
  226. data/spec/api/linked_accounts_api_spec.rb +1 -1
  227. data/spec/api/payments_api_spec.rb +28 -2
  228. data/spec/api/purchase_orders_api_spec.rb +32 -4
  229. data/spec/api/selective_sync_api_spec.rb +72 -0
  230. data/spec/api/tax_rates_api_spec.rb +1 -0
  231. data/spec/api/tracking_categories_api_spec.rb +5 -2
  232. data/spec/api/transactions_api_spec.rb +3 -2
  233. data/spec/api/vendor_credits_api_spec.rb +3 -2
  234. data/spec/models/account_endpoint_request_spec.rb +34 -0
  235. data/spec/models/account_request_spec.rb +100 -0
  236. data/spec/models/account_response_spec.rb +52 -0
  237. data/spec/models/account_spec.rb +18 -6
  238. data/spec/models/accounting_attachment_endpoint_request_spec.rb +34 -0
  239. data/spec/models/accounting_attachment_request_spec.rb +58 -0
  240. data/spec/models/accounting_attachment_response_spec.rb +52 -0
  241. data/spec/models/accounting_attachment_spec.rb +15 -3
  242. data/spec/models/accounting_phone_number_request_spec.rb +52 -0
  243. data/spec/models/address_spec.rb +6 -0
  244. data/spec/models/balance_sheet_spec.rb +15 -3
  245. data/spec/models/cash_flow_statement_spec.rb +15 -3
  246. data/spec/models/common_model_scope_data_spec.rb +40 -0
  247. data/spec/models/common_model_scopes_body_request_spec.rb +46 -0
  248. data/spec/models/common_model_scopes_disabled_models_enabled_actions_enum_spec.rb +28 -0
  249. data/spec/models/common_model_scopes_disabled_models_spec.rb +58 -0
  250. data/spec/models/common_model_scopes_post_inner_deserializer_request_spec.rb +46 -0
  251. data/spec/models/common_model_scopes_spec.rb +40 -0
  252. data/spec/models/common_model_scopes_update_serializer_spec.rb +34 -0
  253. data/spec/models/company_info_spec.rb +12 -6
  254. data/spec/models/condition_schema_spec.rb +70 -0
  255. data/spec/models/condition_type_enum_spec.rb +28 -0
  256. data/spec/models/contact_endpoint_request_spec.rb +34 -0
  257. data/spec/models/contact_request_spec.rb +100 -0
  258. data/spec/models/contact_response_spec.rb +52 -0
  259. data/spec/models/contact_spec.rb +18 -6
  260. data/spec/models/credit_note_line_item_spec.rb +12 -0
  261. data/spec/models/credit_note_spec.rb +17 -5
  262. data/spec/models/enabled_actions_enum_spec.rb +28 -0
  263. data/spec/models/end_user_details_request_spec.rb +6 -0
  264. data/spec/models/expense_endpoint_request_spec.rb +34 -0
  265. data/spec/models/expense_line_request_spec.rb +94 -0
  266. data/spec/models/expense_line_spec.rb +22 -4
  267. data/spec/models/expense_request_spec.rb +94 -0
  268. data/spec/models/expense_response_spec.rb +52 -0
  269. data/spec/models/expense_spec.rb +30 -12
  270. data/spec/models/income_statement_spec.rb +15 -3
  271. data/spec/models/invoice_line_item_request_spec.rb +41 -5
  272. data/spec/models/invoice_line_item_spec.rb +36 -6
  273. data/spec/models/invoice_request_spec.rb +26 -8
  274. data/spec/models/invoice_spec.rb +34 -16
  275. data/spec/models/issue_spec.rb +6 -0
  276. data/spec/models/item_spec.rb +18 -6
  277. data/spec/models/journal_entry_request_spec.rb +25 -7
  278. data/spec/models/journal_entry_spec.rb +35 -11
  279. data/spec/models/journal_line_request_spec.rb +22 -4
  280. data/spec/models/journal_line_spec.rb +10 -4
  281. data/spec/models/linked_account_condition_request_spec.rb +46 -0
  282. data/spec/models/linked_account_condition_spec.rb +64 -0
  283. data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
  284. data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
  285. data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
  286. data/spec/models/meta_response_spec.rb +6 -0
  287. data/spec/models/operator_schema_spec.rb +40 -0
  288. data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
  289. data/spec/models/payment_endpoint_request_spec.rb +34 -0
  290. data/spec/models/payment_request_spec.rb +82 -0
  291. data/spec/models/payment_response_spec.rb +52 -0
  292. data/spec/models/payment_spec.rb +28 -4
  293. data/spec/models/posting_status_enum_spec.rb +28 -0
  294. data/spec/models/purchase_order_endpoint_request_spec.rb +34 -0
  295. data/spec/models/purchase_order_line_item_request_spec.rb +112 -0
  296. data/spec/models/purchase_order_line_item_spec.rb +24 -0
  297. data/spec/models/purchase_order_request_spec.rb +112 -0
  298. data/spec/models/purchase_order_response_spec.rb +52 -0
  299. data/spec/models/purchase_order_spec.rb +34 -16
  300. data/spec/models/report_item_spec.rb +6 -0
  301. data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
  302. data/spec/models/sync_status_spec.rb +6 -0
  303. data/spec/models/tax_rate_spec.rb +19 -7
  304. data/spec/models/tracking_category_spec.rb +20 -8
  305. data/spec/models/transaction_line_item_spec.rb +19 -1
  306. data/spec/models/transaction_spec.rb +30 -12
  307. data/spec/models/vendor_credit_line_spec.rb +12 -0
  308. data/spec/models/vendor_credit_spec.rb +24 -6
  309. metadata +283 -115
@@ -14,11 +14,8 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The InvoiceLineItem Object ### Description The `InvoiceLineItem` object is used to represent an invoice's line items. ### Usage Example Fetch from the `GET Invoice` endpoint and view the invoice's line items.
17
+ # # The InvoiceLineItem Object ### Description The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. If type = accounts_payable, invoice is a bill, if type = accounts_receivable it's an invoice. ### Usage Example Fetch from the `GET Invoice` endpoint and view the invoice's line items.
18
18
  class InvoiceLineItemRequest
19
- # The third-party API ID of the matching object.
20
- attr_accessor :remote_id
21
-
22
19
  # The line item's description.
23
20
  attr_accessor :description
24
21
 
@@ -31,23 +28,47 @@ module MergeAccountingClient
31
28
  # The line item's total amount.
32
29
  attr_accessor :total_amount
33
30
 
31
+ # The line item'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)
32
+ attr_accessor :currency
33
+
34
+ # The line item's exchange rate.
35
+ attr_accessor :exchange_rate
36
+
34
37
  attr_accessor :item
35
38
 
36
39
  attr_accessor :account
37
40
 
38
41
  attr_accessor :tracking_category
39
42
 
43
+ attr_accessor :tracking_categories
44
+
45
+ # The company the line item belongs to.
46
+ attr_accessor :company
47
+
48
+ # The third-party API ID of the matching object.
49
+ attr_accessor :remote_id
50
+
51
+ attr_accessor :integration_params
52
+
53
+ attr_accessor :linked_account_params
54
+
40
55
  # Attribute mapping from ruby-style variable name to JSON key.
41
56
  def self.attribute_map
42
57
  {
43
- :'remote_id' => :'remote_id',
44
58
  :'description' => :'description',
45
59
  :'unit_price' => :'unit_price',
46
60
  :'quantity' => :'quantity',
47
61
  :'total_amount' => :'total_amount',
62
+ :'currency' => :'currency',
63
+ :'exchange_rate' => :'exchange_rate',
48
64
  :'item' => :'item',
49
65
  :'account' => :'account',
50
- :'tracking_category' => :'tracking_category'
66
+ :'tracking_category' => :'tracking_category',
67
+ :'tracking_categories' => :'tracking_categories',
68
+ :'company' => :'company',
69
+ :'remote_id' => :'remote_id',
70
+ :'integration_params' => :'integration_params',
71
+ :'linked_account_params' => :'linked_account_params'
51
72
  }
52
73
  end
53
74
 
@@ -59,28 +80,39 @@ module MergeAccountingClient
59
80
  # Attribute type mapping.
60
81
  def self.openapi_types
61
82
  {
62
- :'remote_id' => :'String',
63
83
  :'description' => :'String',
64
84
  :'unit_price' => :'Float',
65
85
  :'quantity' => :'Float',
66
86
  :'total_amount' => :'Float',
87
+ :'currency' => :'CurrencyEnum',
88
+ :'exchange_rate' => :'String',
67
89
  :'item' => :'String',
68
90
  :'account' => :'String',
69
- :'tracking_category' => :'String'
91
+ :'tracking_category' => :'String',
92
+ :'tracking_categories' => :'Array<String>',
93
+ :'company' => :'String',
94
+ :'remote_id' => :'String',
95
+ :'integration_params' => :'Hash<String, Object>',
96
+ :'linked_account_params' => :'Hash<String, Object>'
70
97
  }
71
98
  end
72
99
 
73
100
  # List of attributes with nullable: true
74
101
  def self.openapi_nullable
75
102
  Set.new([
76
- :'remote_id',
77
103
  :'description',
78
104
  :'unit_price',
79
105
  :'quantity',
80
106
  :'total_amount',
107
+ :'currency',
108
+ :'exchange_rate',
81
109
  :'item',
82
110
  :'account',
83
- :'tracking_category'
111
+ :'tracking_category',
112
+ :'company',
113
+ :'remote_id',
114
+ :'integration_params',
115
+ :'linked_account_params'
84
116
  ])
85
117
  end
86
118
 
@@ -99,10 +131,6 @@ module MergeAccountingClient
99
131
  h[k.to_sym] = v
100
132
  }
101
133
 
102
- if attributes.key?(:'remote_id')
103
- self.remote_id = attributes[:'remote_id']
104
- end
105
-
106
134
  if attributes.key?(:'description')
107
135
  self.description = attributes[:'description']
108
136
  end
@@ -119,6 +147,14 @@ module MergeAccountingClient
119
147
  self.total_amount = attributes[:'total_amount']
120
148
  end
121
149
 
150
+ if attributes.key?(:'currency')
151
+ self.currency = attributes[:'currency']
152
+ end
153
+
154
+ if attributes.key?(:'exchange_rate')
155
+ self.exchange_rate = attributes[:'exchange_rate']
156
+ end
157
+
122
158
  if attributes.key?(:'item')
123
159
  self.item = attributes[:'item']
124
160
  end
@@ -130,34 +166,83 @@ module MergeAccountingClient
130
166
  if attributes.key?(:'tracking_category')
131
167
  self.tracking_category = attributes[:'tracking_category']
132
168
  end
169
+
170
+ if attributes.key?(:'tracking_categories')
171
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
172
+ self.tracking_categories = value
173
+ end
174
+ end
175
+
176
+ if attributes.key?(:'company')
177
+ self.company = attributes[:'company']
178
+ end
179
+
180
+ if attributes.key?(:'remote_id')
181
+ self.remote_id = attributes[:'remote_id']
182
+ end
183
+
184
+ if attributes.key?(:'integration_params')
185
+ if (value = attributes[:'integration_params']).is_a?(Hash)
186
+ self.integration_params = value
187
+ end
188
+ end
189
+
190
+ if attributes.key?(:'linked_account_params')
191
+ if (value = attributes[:'linked_account_params']).is_a?(Hash)
192
+ self.linked_account_params = value
193
+ end
194
+ end
133
195
  end
134
196
 
135
197
  # Show invalid properties with the reasons. Usually used together with valid?
136
198
  # @return Array for valid properties with the reasons
137
199
  def list_invalid_properties
138
200
  invalid_properties = Array.new
201
+ pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
202
+ if !@exchange_rate.nil? && @exchange_rate !~ pattern
203
+ invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
204
+ end
205
+
139
206
  invalid_properties
140
207
  end
141
208
 
142
209
  # Check to see if the all the properties in the model are valid
143
210
  # @return true if the model is valid
144
211
  def valid?
212
+ return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
145
213
  true
146
214
  end
147
215
 
216
+ # Custom attribute writer method with validation
217
+ # @param [Object] exchange_rate Value to be assigned
218
+ def exchange_rate=(exchange_rate)
219
+ pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
220
+ if !exchange_rate.nil? && exchange_rate !~ pattern
221
+ fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
222
+ end
223
+
224
+ @exchange_rate = exchange_rate
225
+ end
226
+
148
227
  # Checks equality by comparing each attribute.
149
228
  # @param [Object] Object to be compared
150
229
  def ==(o)
151
230
  return true if self.equal?(o)
152
231
  self.class == o.class &&
153
- remote_id == o.remote_id &&
154
232
  description == o.description &&
155
233
  unit_price == o.unit_price &&
156
234
  quantity == o.quantity &&
157
235
  total_amount == o.total_amount &&
236
+ currency == o.currency &&
237
+ exchange_rate == o.exchange_rate &&
158
238
  item == o.item &&
159
239
  account == o.account &&
160
- tracking_category == o.tracking_category
240
+ tracking_category == o.tracking_category &&
241
+ tracking_categories == o.tracking_categories &&
242
+ company == o.company &&
243
+ remote_id == o.remote_id &&
244
+ integration_params == o.integration_params &&
245
+ linked_account_params == o.linked_account_params
161
246
  end
162
247
 
163
248
  # @see the `==` method
@@ -169,7 +254,7 @@ module MergeAccountingClient
169
254
  # Calculates hash code according to all attributes.
170
255
  # @return [Integer] Hash code
171
256
  def hash
172
- [remote_id, description, unit_price, quantity, total_amount, item, account, tracking_category].hash
257
+ [description, unit_price, quantity, total_amount, currency, exchange_rate, item, account, tracking_category, tracking_categories, company, remote_id, integration_params, linked_account_params].hash
173
258
  end
174
259
 
175
260
  # Builds the object from hash
@@ -14,14 +14,12 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The Invoice Object ### Description The `Invoice` object is used to represent a company's invoices. ### Usage Example Fetch from the `LIST Invoices` endpoint and view a company's invoices.
17
+ # # The Invoice Object ### Description The `Invoice` object represents an itemized record of goods and/or services sold to a customer. If type = accounts_payable `Invoice` is a bill, if type = accounts_receivable it's an invoice. ### Usage Example Fetch from the `LIST Invoices` endpoint and view a company's invoices.
18
18
  class InvoiceRequest
19
- # The third-party API ID of the matching object.
20
- attr_accessor :remote_id
21
-
22
- # The invoice's type.
19
+ # Whether the invoice is an accounts receivable or accounts payable. Accounts payable invoices are commonly referred to as Bills. * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
23
20
  attr_accessor :type
24
21
 
22
+ # The invoice's contact.
25
23
  attr_accessor :contact
26
24
 
27
25
  # The invoice's number.
@@ -39,16 +37,22 @@ module MergeAccountingClient
39
37
  # The invoice's private note.
40
38
  attr_accessor :memo
41
39
 
42
- # The invoice's currency.
40
+ # The company the invoice belongs to.
41
+ attr_accessor :company
42
+
43
+ # The invoice'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)
43
44
  attr_accessor :currency
44
45
 
45
- # The invoice's total discount.
46
+ # The invoice's exchange rate.
47
+ attr_accessor :exchange_rate
48
+
49
+ # The total discounts applied to the total cost.
46
50
  attr_accessor :total_discount
47
51
 
48
- # The invoice's sub-total.
52
+ # The total amount being paid before taxes.
49
53
  attr_accessor :sub_total
50
54
 
51
- # The invoice's total tax amount.
55
+ # The total amount being paid in taxes.
52
56
  attr_accessor :total_tax_amount
53
57
 
54
58
  # The invoice's total amount.
@@ -57,16 +61,18 @@ module MergeAccountingClient
57
61
  # The invoice's remaining balance.
58
62
  attr_accessor :balance
59
63
 
60
- # When the third party's invoice entry was updated.
61
- attr_accessor :remote_updated_at
62
-
63
64
  # Array of `Payment` object IDs.
64
65
  attr_accessor :payments
65
66
 
67
+ attr_accessor :line_items
68
+
69
+ attr_accessor :integration_params
70
+
71
+ attr_accessor :linked_account_params
72
+
66
73
  # Attribute mapping from ruby-style variable name to JSON key.
67
74
  def self.attribute_map
68
75
  {
69
- :'remote_id' => :'remote_id',
70
76
  :'type' => :'type',
71
77
  :'contact' => :'contact',
72
78
  :'number' => :'number',
@@ -74,14 +80,18 @@ module MergeAccountingClient
74
80
  :'due_date' => :'due_date',
75
81
  :'paid_on_date' => :'paid_on_date',
76
82
  :'memo' => :'memo',
83
+ :'company' => :'company',
77
84
  :'currency' => :'currency',
85
+ :'exchange_rate' => :'exchange_rate',
78
86
  :'total_discount' => :'total_discount',
79
87
  :'sub_total' => :'sub_total',
80
88
  :'total_tax_amount' => :'total_tax_amount',
81
89
  :'total_amount' => :'total_amount',
82
90
  :'balance' => :'balance',
83
- :'remote_updated_at' => :'remote_updated_at',
84
- :'payments' => :'payments'
91
+ :'payments' => :'payments',
92
+ :'line_items' => :'line_items',
93
+ :'integration_params' => :'integration_params',
94
+ :'linked_account_params' => :'linked_account_params'
85
95
  }
86
96
  end
87
97
 
@@ -93,7 +103,6 @@ module MergeAccountingClient
93
103
  # Attribute type mapping.
94
104
  def self.openapi_types
95
105
  {
96
- :'remote_id' => :'String',
97
106
  :'type' => :'InvoiceTypeEnum',
98
107
  :'contact' => :'String',
99
108
  :'number' => :'String',
@@ -101,21 +110,24 @@ module MergeAccountingClient
101
110
  :'due_date' => :'Time',
102
111
  :'paid_on_date' => :'Time',
103
112
  :'memo' => :'String',
113
+ :'company' => :'String',
104
114
  :'currency' => :'CurrencyEnum',
115
+ :'exchange_rate' => :'String',
105
116
  :'total_discount' => :'Float',
106
117
  :'sub_total' => :'Float',
107
118
  :'total_tax_amount' => :'Float',
108
119
  :'total_amount' => :'Float',
109
120
  :'balance' => :'Float',
110
- :'remote_updated_at' => :'Time',
111
- :'payments' => :'Array<String>'
121
+ :'payments' => :'Array<String>',
122
+ :'line_items' => :'Array<InvoiceLineItemRequest>',
123
+ :'integration_params' => :'Hash<String, Object>',
124
+ :'linked_account_params' => :'Hash<String, Object>'
112
125
  }
113
126
  end
114
127
 
115
128
  # List of attributes with nullable: true
116
129
  def self.openapi_nullable
117
130
  Set.new([
118
- :'remote_id',
119
131
  :'type',
120
132
  :'contact',
121
133
  :'number',
@@ -123,13 +135,16 @@ module MergeAccountingClient
123
135
  :'due_date',
124
136
  :'paid_on_date',
125
137
  :'memo',
138
+ :'company',
126
139
  :'currency',
140
+ :'exchange_rate',
127
141
  :'total_discount',
128
142
  :'sub_total',
129
143
  :'total_tax_amount',
130
144
  :'total_amount',
131
145
  :'balance',
132
- :'remote_updated_at',
146
+ :'integration_params',
147
+ :'linked_account_params'
133
148
  ])
134
149
  end
135
150
 
@@ -148,10 +163,6 @@ module MergeAccountingClient
148
163
  h[k.to_sym] = v
149
164
  }
150
165
 
151
- if attributes.key?(:'remote_id')
152
- self.remote_id = attributes[:'remote_id']
153
- end
154
-
155
166
  if attributes.key?(:'type')
156
167
  self.type = attributes[:'type']
157
168
  end
@@ -180,10 +191,18 @@ module MergeAccountingClient
180
191
  self.memo = attributes[:'memo']
181
192
  end
182
193
 
194
+ if attributes.key?(:'company')
195
+ self.company = attributes[:'company']
196
+ end
197
+
183
198
  if attributes.key?(:'currency')
184
199
  self.currency = attributes[:'currency']
185
200
  end
186
201
 
202
+ if attributes.key?(:'exchange_rate')
203
+ self.exchange_rate = attributes[:'exchange_rate']
204
+ end
205
+
187
206
  if attributes.key?(:'total_discount')
188
207
  self.total_discount = attributes[:'total_discount']
189
208
  end
@@ -204,36 +223,66 @@ module MergeAccountingClient
204
223
  self.balance = attributes[:'balance']
205
224
  end
206
225
 
207
- if attributes.key?(:'remote_updated_at')
208
- self.remote_updated_at = attributes[:'remote_updated_at']
209
- end
210
-
211
226
  if attributes.key?(:'payments')
212
227
  if (value = attributes[:'payments']).is_a?(Array)
213
228
  self.payments = value
214
229
  end
215
230
  end
231
+
232
+ if attributes.key?(:'line_items')
233
+ if (value = attributes[:'line_items']).is_a?(Array)
234
+ self.line_items = value
235
+ end
236
+ end
237
+
238
+ if attributes.key?(:'integration_params')
239
+ if (value = attributes[:'integration_params']).is_a?(Hash)
240
+ self.integration_params = value
241
+ end
242
+ end
243
+
244
+ if attributes.key?(:'linked_account_params')
245
+ if (value = attributes[:'linked_account_params']).is_a?(Hash)
246
+ self.linked_account_params = value
247
+ end
248
+ end
216
249
  end
217
250
 
218
251
  # Show invalid properties with the reasons. Usually used together with valid?
219
252
  # @return Array for valid properties with the reasons
220
253
  def list_invalid_properties
221
254
  invalid_properties = Array.new
255
+ pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
256
+ if !@exchange_rate.nil? && @exchange_rate !~ pattern
257
+ invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
258
+ end
259
+
222
260
  invalid_properties
223
261
  end
224
262
 
225
263
  # Check to see if the all the properties in the model are valid
226
264
  # @return true if the model is valid
227
265
  def valid?
266
+ return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
228
267
  true
229
268
  end
230
269
 
270
+ # Custom attribute writer method with validation
271
+ # @param [Object] exchange_rate Value to be assigned
272
+ def exchange_rate=(exchange_rate)
273
+ pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
274
+ if !exchange_rate.nil? && exchange_rate !~ pattern
275
+ fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
276
+ end
277
+
278
+ @exchange_rate = exchange_rate
279
+ end
280
+
231
281
  # Checks equality by comparing each attribute.
232
282
  # @param [Object] Object to be compared
233
283
  def ==(o)
234
284
  return true if self.equal?(o)
235
285
  self.class == o.class &&
236
- remote_id == o.remote_id &&
237
286
  type == o.type &&
238
287
  contact == o.contact &&
239
288
  number == o.number &&
@@ -241,14 +290,18 @@ module MergeAccountingClient
241
290
  due_date == o.due_date &&
242
291
  paid_on_date == o.paid_on_date &&
243
292
  memo == o.memo &&
293
+ company == o.company &&
244
294
  currency == o.currency &&
295
+ exchange_rate == o.exchange_rate &&
245
296
  total_discount == o.total_discount &&
246
297
  sub_total == o.sub_total &&
247
298
  total_tax_amount == o.total_tax_amount &&
248
299
  total_amount == o.total_amount &&
249
300
  balance == o.balance &&
250
- remote_updated_at == o.remote_updated_at &&
251
- payments == o.payments
301
+ payments == o.payments &&
302
+ line_items == o.line_items &&
303
+ integration_params == o.integration_params &&
304
+ linked_account_params == o.linked_account_params
252
305
  end
253
306
 
254
307
  # @see the `==` method
@@ -260,7 +313,7 @@ module MergeAccountingClient
260
313
  # Calculates hash code according to all attributes.
261
314
  # @return [Integer] Hash code
262
315
  def hash
263
- [remote_id, type, contact, number, issue_date, due_date, paid_on_date, memo, currency, total_discount, sub_total, total_tax_amount, total_amount, balance, remote_updated_at, payments].hash
316
+ [type, contact, number, issue_date, due_date, paid_on_date, memo, company, currency, exchange_rate, total_discount, sub_total, total_tax_amount, total_amount, balance, payments, line_items, integration_params, linked_account_params].hash
264
317
  end
265
318
 
266
319
  # Builds the object from hash
@@ -29,6 +29,8 @@ module MergeAccountingClient
29
29
 
30
30
  attr_accessor :is_muted
31
31
 
32
+ attr_accessor :error_details
33
+
32
34
  # Attribute mapping from ruby-style variable name to JSON key.
33
35
  def self.attribute_map
34
36
  {
@@ -38,7 +40,8 @@ module MergeAccountingClient
38
40
  :'end_user' => :'end_user',
39
41
  :'first_incident_time' => :'first_incident_time',
40
42
  :'last_incident_time' => :'last_incident_time',
41
- :'is_muted' => :'is_muted'
43
+ :'is_muted' => :'is_muted',
44
+ :'error_details' => :'error_details'
42
45
  }
43
46
  end
44
47
 
@@ -56,7 +59,8 @@ module MergeAccountingClient
56
59
  :'end_user' => :'Hash<String, Object>',
57
60
  :'first_incident_time' => :'Time',
58
61
  :'last_incident_time' => :'Time',
59
- :'is_muted' => :'Boolean'
62
+ :'is_muted' => :'Boolean',
63
+ :'error_details' => :'Array<String>'
60
64
  }
61
65
  end
62
66
 
@@ -112,6 +116,12 @@ module MergeAccountingClient
112
116
  if attributes.key?(:'is_muted')
113
117
  self.is_muted = attributes[:'is_muted']
114
118
  end
119
+
120
+ if attributes.key?(:'error_details')
121
+ if (value = attributes[:'error_details']).is_a?(Array)
122
+ self.error_details = value
123
+ end
124
+ end
115
125
  end
116
126
 
117
127
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -143,7 +153,8 @@ module MergeAccountingClient
143
153
  end_user == o.end_user &&
144
154
  first_incident_time == o.first_incident_time &&
145
155
  last_incident_time == o.last_incident_time &&
146
- is_muted == o.is_muted
156
+ is_muted == o.is_muted &&
157
+ error_details == o.error_details
147
158
  end
148
159
 
149
160
  # @see the `==` method
@@ -155,7 +166,7 @@ module MergeAccountingClient
155
166
  # Calculates hash code according to all attributes.
156
167
  # @return [Integer] Hash code
157
168
  def hash
158
- [id, status, error_description, end_user, first_incident_time, last_incident_time, is_muted].hash
169
+ [id, status, error_description, end_user, first_incident_time, last_incident_time, is_muted, error_details].hash
159
170
  end
160
171
 
161
172
  # Builds the object from hash