merge_accounting_client 1.0.6 → 1.0.8

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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +224 -229
  3. data/docs/CreditNote.md +1 -1
  4. data/docs/CreditNoteLineItem.md +1 -1
  5. data/docs/Expense.md +1 -1
  6. data/docs/ExpenseLine.md +4 -2
  7. data/docs/ExpenseLineRequest.md +4 -2
  8. data/docs/ExpenseRequest.md +1 -1
  9. data/docs/Invoice.md +1 -1
  10. data/docs/InvoiceLineItem.md +2 -2
  11. data/docs/InvoiceLineItemRequest.md +2 -2
  12. data/docs/InvoiceRequest.md +18 -18
  13. data/docs/JournalEntry.md +2 -2
  14. data/docs/JournalEntryRequest.md +10 -10
  15. data/docs/JournalLine.md +4 -2
  16. data/docs/JournalLineRequest.md +4 -2
  17. data/docs/PurchaseOrder.md +2 -2
  18. data/docs/PurchaseOrderLineItem.md +2 -0
  19. data/docs/PurchaseOrderLineItemRequest.md +2 -0
  20. data/docs/PurchaseOrderRequest.md +12 -12
  21. data/docs/SyncStatusApi.md +11 -15
  22. data/docs/Transaction.md +4 -2
  23. data/docs/TransactionLineItem.md +2 -0
  24. data/docs/VendorCredit.md +2 -2
  25. data/docs/VendorCreditLine.md +3 -1
  26. data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
  27. data/lib/merge_accounting_client/api/transactions_api.rb +2 -2
  28. data/lib/merge_accounting_client/models/account_integration.rb +3 -3
  29. data/lib/merge_accounting_client/models/credit_note_line_item.rb +9 -9
  30. data/lib/merge_accounting_client/models/expense.rb +3 -3
  31. data/lib/merge_accounting_client/models/expense_line.rb +37 -9
  32. data/lib/merge_accounting_client/models/expense_line_request.rb +37 -9
  33. data/lib/merge_accounting_client/models/expense_request.rb +3 -3
  34. data/lib/merge_accounting_client/models/invoice.rb +3 -3
  35. data/lib/merge_accounting_client/models/invoice_line_item.rb +15 -15
  36. data/lib/merge_accounting_client/models/invoice_line_item_request.rb +15 -15
  37. data/lib/merge_accounting_client/models/invoice_request.rb +3 -3
  38. data/lib/merge_accounting_client/models/journal_entry.rb +3 -3
  39. data/lib/merge_accounting_client/models/journal_entry_request.rb +3 -3
  40. data/lib/merge_accounting_client/models/journal_line.rb +37 -9
  41. data/lib/merge_accounting_client/models/journal_line_request.rb +37 -9
  42. data/lib/merge_accounting_client/models/payment.rb +3 -3
  43. data/lib/merge_accounting_client/models/payment_request.rb +3 -3
  44. data/lib/merge_accounting_client/models/purchase_order.rb +3 -3
  45. data/lib/merge_accounting_client/models/purchase_order_line_item.rb +21 -10
  46. data/lib/merge_accounting_client/models/purchase_order_line_item_request.rb +21 -10
  47. data/lib/merge_accounting_client/models/purchase_order_request.rb +3 -3
  48. data/lib/merge_accounting_client/models/sync_status_status_enum.rb +2 -1
  49. data/lib/merge_accounting_client/models/transaction.rb +18 -7
  50. data/lib/merge_accounting_client/models/transaction_line_item.rb +24 -13
  51. data/lib/merge_accounting_client/models/vendor_credit.rb +3 -3
  52. data/lib/merge_accounting_client/models/vendor_credit_line.rb +33 -5
  53. data/lib/merge_accounting_client/version.rb +1 -1
  54. data/spec/api/sync_status_api_spec.rb +1 -1
  55. data/spec/models/expense_line_request_spec.rb +7 -1
  56. data/spec/models/expense_line_spec.rb +7 -1
  57. data/spec/models/invoice_line_item_request_spec.rb +6 -6
  58. data/spec/models/invoice_line_item_spec.rb +6 -6
  59. data/spec/models/journal_line_request_spec.rb +7 -1
  60. data/spec/models/journal_line_spec.rb +7 -1
  61. data/spec/models/purchase_order_line_item_request_spec.rb +6 -0
  62. data/spec/models/purchase_order_line_item_spec.rb +6 -0
  63. data/spec/models/transaction_line_item_spec.rb +6 -0
  64. data/spec/models/transaction_spec.rb +6 -0
  65. data/spec/models/vendor_credit_line_spec.rb +6 -0
  66. metadata +146 -146
data/docs/VendorCredit.md CHANGED
@@ -13,7 +13,7 @@
13
13
  | **currency** | [**CurrencyEnum**](CurrencyEnum.md) | The vendor credit'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) | [optional] |
14
14
  | **exchange_rate** | **String** | The vendor credit's exchange rate. | [optional] |
15
15
  | **company** | **String** | The company the vendor credit belongs to. | [optional] |
16
- | **lines** | [**Array<VendorCreditLine>**](VendorCreditLine.md) | | [optional] |
16
+ | **lines** | [**Array<VendorCreditLine>**](VendorCreditLine.md) | | [optional][readonly] |
17
17
  | **remote_was_deleted** | **Boolean** | Indicates whether or not this object has been deleted by third party webhooks. | [optional][readonly] |
18
18
  | **field_mappings** | [**Hash<String, AnyType>**](AnyType.md) | | [optional][readonly] |
19
19
  | **remote_data** | [**Array<RemoteData>**](RemoteData.md) | | [optional][readonly] |
@@ -33,7 +33,7 @@ instance = MergeAccountingClient::VendorCredit.new(
33
33
  currency: USD,
34
34
  exchange_rate: 2.9,
35
35
  company: 595c8f97-2ac4-45b7-b000-41bdf43240b5,
36
- lines: [{"remote_id":"121222","net_amount":25.54,"tracking_category":"b38c59b0-a9d7-4740-b1ee-5436c6751e3d","tracking_categories":["b38c59b0-a9d7-4740-b1ee-5436c6751e3d","9b840d2-686a-465a-8a8e-7b028498f8e4","a47e11b6-c73b-4a0c-be31-130fc48177fa"],"description":"Gifted Merge Credit","account":"9d892439-5fab-4dbb-8bd8-34f7f96c7912","company":"595c8f97-2ac4-45b7-b000-41bdf43240b5"},{"remote_id":"121223","net_amount":10,"tracking_category":"b38c59b0-a9d7-4740-b1ee-5436c6751e3d","tracking_categories":["b38c59b0-a9d7-4740-b1ee-5436c6751e3d","9b840d2-686a-465a-8a8e-7b028498f8e4","a47e11b6-c73b-4a0c-be31-130fc48177fa"],"description":"Refund for overpayment","account":"9d892439-5fab-4dbb-8bd8-34f7f96c7912"}],
36
+ lines: [{"remote_id":"121222","net_amount":25.54,"tracking_category":"b38c59b0-a9d7-4740-b1ee-5436c6751e3d","tracking_categories":["b38c59b0-a9d7-4740-b1ee-5436c6751e3d","9b840d2-686a-465a-8a8e-7b028498f8e4","a47e11b6-c73b-4a0c-be31-130fc48177fa"],"exchange_rate":"2.9","description":"Gifted Merge Credit","account":"9d892439-5fab-4dbb-8bd8-34f7f96c7912","company":"595c8f97-2ac4-45b7-b000-41bdf43240b5"},{"remote_id":"121223","net_amount":10,"tracking_category":"b38c59b0-a9d7-4740-b1ee-5436c6751e3d","tracking_categories":["b38c59b0-a9d7-4740-b1ee-5436c6751e3d","9b840d2-686a-465a-8a8e-7b028498f8e4","a47e11b6-c73b-4a0c-be31-130fc48177fa"],"description":"Refund for overpayment","account":"9d892439-5fab-4dbb-8bd8-34f7f96c7912"}],
37
37
  remote_was_deleted: null,
38
38
  field_mappings: {"organization_defined_targets":{"custom_key":"custom_value"},"linked_account_defined_targets":{"custom_key":"custom_value"}},
39
39
  remote_data: [{"path":"/actions","data":["Varies by platform"]}]
@@ -11,6 +11,7 @@
11
11
  | **description** | **String** | The line's description. | [optional] |
12
12
  | **account** | **String** | The line's account. | [optional] |
13
13
  | **company** | **String** | The company the line belongs to. | [optional] |
14
+ | **exchange_rate** | **String** | The vendor credit line item's exchange rate. | [optional] |
14
15
 
15
16
  ## Example
16
17
 
@@ -24,7 +25,8 @@ instance = MergeAccountingClient::VendorCreditLine.new(
24
25
  tracking_categories: ["b38c59b0-a9d7-4740-b1ee-5436c6751e3d","9b840d2-686a-465a-8a8e-7b028498f8e4","a47e11b6-c73b-4a0c-be31-130fc48177fa"],
25
26
  description: Gifted Merge Credit,
26
27
  account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912,
27
- company: 595c8f97-2ac4-45b7-b000-41bdf43240b5
28
+ company: 595c8f97-2ac4-45b7-b000-41bdf43240b5,
29
+ exchange_rate: 2.9
28
30
  )
29
31
  ```
30
32
 
@@ -19,7 +19,7 @@ module MergeAccountingClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PAUSED`, `SYNCING`
22
+ # Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PAUSED`, `SYNCING`, `PARTIALLY_SYNCED`
23
23
  # @param x_account_token [String] Token identifying the end user.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [String] :cursor The pagination cursor value.
@@ -30,7 +30,7 @@ module MergeAccountingClient
30
30
  data
31
31
  end
32
32
 
33
- # Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PAUSED`, `SYNCING`
33
+ # Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PAUSED`, `SYNCING`, `PARTIALLY_SYNCED`
34
34
  # @param x_account_token [String] Token identifying the end user.
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @option opts [String] :cursor The pagination cursor value.
@@ -66,7 +66,7 @@ module MergeAccountingClient
66
66
  if @api_client.config.client_side_validation && x_account_token.nil?
67
67
  fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TransactionsApi.transactions_list"
68
68
  end
69
- allowable_values = ["account", "contact", "contact,account", "line_items", "line_items,account", "line_items,contact", "line_items,contact,account"]
69
+ allowable_values = ["account", "contact", "contact,account", "line_items", "line_items,account", "line_items,contact", "line_items,contact,account", "line_items,tracking_categories", "line_items,tracking_categories,account", "line_items,tracking_categories,contact", "line_items,tracking_categories,contact,account", "tracking_categories", "tracking_categories,account", "tracking_categories,contact", "tracking_categories,contact,account"]
70
70
  if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
71
71
  fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
72
72
  end
@@ -155,7 +155,7 @@ module MergeAccountingClient
155
155
  if @api_client.config.client_side_validation && id.nil?
156
156
  fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.transactions_retrieve"
157
157
  end
158
- allowable_values = ["account", "contact", "contact,account", "line_items", "line_items,account", "line_items,contact", "line_items,contact,account"]
158
+ allowable_values = ["account", "contact", "contact,account", "line_items", "line_items,account", "line_items,contact", "line_items,contact,account", "line_items,tracking_categories", "line_items,tracking_categories,account", "line_items,tracking_categories,contact", "line_items,tracking_categories,contact,account", "tracking_categories", "tracking_categories,account", "tracking_categories,contact", "tracking_categories,contact,account"]
159
159
  if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
160
160
  fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
161
161
  end
@@ -124,7 +124,7 @@ module MergeAccountingClient
124
124
  end
125
125
 
126
126
  pattern = Regexp.new(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
127
- if !@color.nil? && @color !~ pattern
127
+ if !@color.nil? && @color.to_s !~ pattern
128
128
  invalid_properties.push("invalid value for \"color\", must conform to the pattern #{pattern}.")
129
129
  end
130
130
 
@@ -136,7 +136,7 @@ module MergeAccountingClient
136
136
  def valid?
137
137
  return false if @name.nil?
138
138
  return false if !@color.nil? && @color.to_s.length > 18
139
- return false if !@color.nil? && @color !~ Regexp.new(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
139
+ return false if !@color.nil? && @color.to_s !~ Regexp.new(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
140
140
  true
141
141
  end
142
142
 
@@ -148,7 +148,7 @@ module MergeAccountingClient
148
148
  end
149
149
 
150
150
  pattern = Regexp.new(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
151
- if !color.nil? && color !~ pattern
151
+ if !color.nil? && color.to_s !~ pattern
152
152
  fail ArgumentError, "invalid value for \"color\", must conform to the pattern #{pattern}."
153
153
  end
154
154
 
@@ -189,17 +189,17 @@ module MergeAccountingClient
189
189
  def list_invalid_properties
190
190
  invalid_properties = Array.new
191
191
  pattern = Regexp.new(/^-?\d{0,24}(?:\.\d{0,8})?$/)
192
- if !@quantity.nil? && @quantity !~ pattern
192
+ if !@quantity.nil? && @quantity.to_s !~ pattern
193
193
  invalid_properties.push("invalid value for \"quantity\", must conform to the pattern #{pattern}.")
194
194
  end
195
195
 
196
196
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
197
- if !@unit_price.nil? && @unit_price !~ pattern
197
+ if !@unit_price.nil? && @unit_price.to_s !~ pattern
198
198
  invalid_properties.push("invalid value for \"unit_price\", must conform to the pattern #{pattern}.")
199
199
  end
200
200
 
201
201
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
202
- if !@total_line_amount.nil? && @total_line_amount !~ pattern
202
+ if !@total_line_amount.nil? && @total_line_amount.to_s !~ pattern
203
203
  invalid_properties.push("invalid value for \"total_line_amount\", must conform to the pattern #{pattern}.")
204
204
  end
205
205
 
@@ -213,9 +213,9 @@ module MergeAccountingClient
213
213
  # Check to see if the all the properties in the model are valid
214
214
  # @return true if the model is valid
215
215
  def valid?
216
- return false if !@quantity.nil? && @quantity !~ Regexp.new(/^-?\d{0,24}(?:\.\d{0,8})?$/)
217
- return false if !@unit_price.nil? && @unit_price !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
218
- return false if !@total_line_amount.nil? && @total_line_amount !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
216
+ return false if !@quantity.nil? && @quantity.to_s !~ Regexp.new(/^-?\d{0,24}(?:\.\d{0,8})?$/)
217
+ return false if !@unit_price.nil? && @unit_price.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
218
+ return false if !@total_line_amount.nil? && @total_line_amount.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
219
219
  return false if @tracking_categories.nil?
220
220
  true
221
221
  end
@@ -224,7 +224,7 @@ module MergeAccountingClient
224
224
  # @param [Object] quantity Value to be assigned
225
225
  def quantity=(quantity)
226
226
  pattern = Regexp.new(/^-?\d{0,24}(?:\.\d{0,8})?$/)
227
- if !quantity.nil? && quantity !~ pattern
227
+ if !quantity.nil? && quantity.to_s !~ pattern
228
228
  fail ArgumentError, "invalid value for \"quantity\", must conform to the pattern #{pattern}."
229
229
  end
230
230
 
@@ -235,7 +235,7 @@ module MergeAccountingClient
235
235
  # @param [Object] unit_price Value to be assigned
236
236
  def unit_price=(unit_price)
237
237
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
238
- if !unit_price.nil? && unit_price !~ pattern
238
+ if !unit_price.nil? && unit_price.to_s !~ pattern
239
239
  fail ArgumentError, "invalid value for \"unit_price\", must conform to the pattern #{pattern}."
240
240
  end
241
241
 
@@ -246,7 +246,7 @@ module MergeAccountingClient
246
246
  # @param [Object] total_line_amount Value to be assigned
247
247
  def total_line_amount=(total_line_amount)
248
248
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
249
- if !total_line_amount.nil? && total_line_amount !~ pattern
249
+ if !total_line_amount.nil? && total_line_amount.to_s !~ pattern
250
250
  fail ArgumentError, "invalid value for \"total_line_amount\", must conform to the pattern #{pattern}."
251
251
  end
252
252
 
@@ -209,7 +209,7 @@ module MergeAccountingClient
209
209
  def list_invalid_properties
210
210
  invalid_properties = Array.new
211
211
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
212
- if !@exchange_rate.nil? && @exchange_rate !~ pattern
212
+ if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
213
213
  invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
214
214
  end
215
215
 
@@ -219,7 +219,7 @@ module MergeAccountingClient
219
219
  # Check to see if the all the properties in the model are valid
220
220
  # @return true if the model is valid
221
221
  def valid?
222
- return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
222
+ return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
223
223
  true
224
224
  end
225
225
 
@@ -227,7 +227,7 @@ module MergeAccountingClient
227
227
  # @param [Object] exchange_rate Value to be assigned
228
228
  def exchange_rate=(exchange_rate)
229
229
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
230
- if !exchange_rate.nil? && exchange_rate !~ pattern
230
+ if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
231
231
  fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
232
232
  end
233
233
 
@@ -16,6 +16,9 @@ require 'time'
16
16
  module MergeAccountingClient
17
17
  # # The ExpenseLine Object ### Description The `ExpenseLine` object is used to represent an expense's line items. ### Usage Example Fetch from the `GET Expense` endpoint and view the expense's line items.
18
18
  class ExpenseLine
19
+ # The third-party API ID of the matching object.
20
+ attr_accessor :remote_id
21
+
19
22
  # The line's item.
20
23
  attr_accessor :item
21
24
 
@@ -38,12 +41,13 @@ module MergeAccountingClient
38
41
  # The description of the item that was purchased by the company.
39
42
  attr_accessor :description
40
43
 
41
- # The third-party API ID of the matching object.
42
- attr_accessor :remote_id
44
+ # The expense line item's exchange rate.
45
+ attr_accessor :exchange_rate
43
46
 
44
47
  # Attribute mapping from ruby-style variable name to JSON key.
45
48
  def self.attribute_map
46
49
  {
50
+ :'remote_id' => :'remote_id',
47
51
  :'item' => :'item',
48
52
  :'net_amount' => :'net_amount',
49
53
  :'tracking_category' => :'tracking_category',
@@ -52,7 +56,7 @@ module MergeAccountingClient
52
56
  :'account' => :'account',
53
57
  :'contact' => :'contact',
54
58
  :'description' => :'description',
55
- :'remote_id' => :'remote_id'
59
+ :'exchange_rate' => :'exchange_rate'
56
60
  }
57
61
  end
58
62
 
@@ -64,6 +68,7 @@ module MergeAccountingClient
64
68
  # Attribute type mapping.
65
69
  def self.openapi_types
66
70
  {
71
+ :'remote_id' => :'String',
67
72
  :'item' => :'String',
68
73
  :'net_amount' => :'Float',
69
74
  :'tracking_category' => :'String',
@@ -72,13 +77,14 @@ module MergeAccountingClient
72
77
  :'account' => :'String',
73
78
  :'contact' => :'String',
74
79
  :'description' => :'String',
75
- :'remote_id' => :'String'
80
+ :'exchange_rate' => :'String'
76
81
  }
77
82
  end
78
83
 
79
84
  # List of attributes with nullable: true
80
85
  def self.openapi_nullable
81
86
  Set.new([
87
+ :'remote_id',
82
88
  :'item',
83
89
  :'net_amount',
84
90
  :'tracking_category',
@@ -86,7 +92,7 @@ module MergeAccountingClient
86
92
  :'account',
87
93
  :'contact',
88
94
  :'description',
89
- :'remote_id'
95
+ :'exchange_rate'
90
96
  ])
91
97
  end
92
98
 
@@ -105,6 +111,10 @@ module MergeAccountingClient
105
111
  h[k.to_sym] = v
106
112
  }
107
113
 
114
+ if attributes.key?(:'remote_id')
115
+ self.remote_id = attributes[:'remote_id']
116
+ end
117
+
108
118
  if attributes.key?(:'item')
109
119
  self.item = attributes[:'item']
110
120
  end
@@ -139,8 +149,8 @@ module MergeAccountingClient
139
149
  self.description = attributes[:'description']
140
150
  end
141
151
 
142
- if attributes.key?(:'remote_id')
143
- self.remote_id = attributes[:'remote_id']
152
+ if attributes.key?(:'exchange_rate')
153
+ self.exchange_rate = attributes[:'exchange_rate']
144
154
  end
145
155
  end
146
156
 
@@ -148,20 +158,38 @@ module MergeAccountingClient
148
158
  # @return Array for valid properties with the reasons
149
159
  def list_invalid_properties
150
160
  invalid_properties = Array.new
161
+ pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
162
+ if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
163
+ invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
164
+ end
165
+
151
166
  invalid_properties
152
167
  end
153
168
 
154
169
  # Check to see if the all the properties in the model are valid
155
170
  # @return true if the model is valid
156
171
  def valid?
172
+ return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
157
173
  true
158
174
  end
159
175
 
176
+ # Custom attribute writer method with validation
177
+ # @param [Object] exchange_rate Value to be assigned
178
+ def exchange_rate=(exchange_rate)
179
+ pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
180
+ if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
181
+ fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
182
+ end
183
+
184
+ @exchange_rate = exchange_rate
185
+ end
186
+
160
187
  # Checks equality by comparing each attribute.
161
188
  # @param [Object] Object to be compared
162
189
  def ==(o)
163
190
  return true if self.equal?(o)
164
191
  self.class == o.class &&
192
+ remote_id == o.remote_id &&
165
193
  item == o.item &&
166
194
  net_amount == o.net_amount &&
167
195
  tracking_category == o.tracking_category &&
@@ -170,7 +198,7 @@ module MergeAccountingClient
170
198
  account == o.account &&
171
199
  contact == o.contact &&
172
200
  description == o.description &&
173
- remote_id == o.remote_id
201
+ exchange_rate == o.exchange_rate
174
202
  end
175
203
 
176
204
  # @see the `==` method
@@ -182,7 +210,7 @@ module MergeAccountingClient
182
210
  # Calculates hash code according to all attributes.
183
211
  # @return [Integer] Hash code
184
212
  def hash
185
- [item, net_amount, tracking_category, tracking_categories, company, account, contact, description, remote_id].hash
213
+ [remote_id, item, net_amount, tracking_category, tracking_categories, company, account, contact, description, exchange_rate].hash
186
214
  end
187
215
 
188
216
  # Builds the object from hash
@@ -16,6 +16,9 @@ require 'time'
16
16
  module MergeAccountingClient
17
17
  # # The ExpenseLine Object ### Description The `ExpenseLine` object is used to represent an expense's line items. ### Usage Example Fetch from the `GET Expense` endpoint and view the expense's line items.
18
18
  class ExpenseLineRequest
19
+ # The third-party API ID of the matching object.
20
+ attr_accessor :remote_id
21
+
19
22
  # The line's item.
20
23
  attr_accessor :item
21
24
 
@@ -38,8 +41,8 @@ module MergeAccountingClient
38
41
  # The description of the item that was purchased by the company.
39
42
  attr_accessor :description
40
43
 
41
- # The third-party API ID of the matching object.
42
- attr_accessor :remote_id
44
+ # The expense line item's exchange rate.
45
+ attr_accessor :exchange_rate
43
46
 
44
47
  attr_accessor :integration_params
45
48
 
@@ -48,6 +51,7 @@ module MergeAccountingClient
48
51
  # Attribute mapping from ruby-style variable name to JSON key.
49
52
  def self.attribute_map
50
53
  {
54
+ :'remote_id' => :'remote_id',
51
55
  :'item' => :'item',
52
56
  :'net_amount' => :'net_amount',
53
57
  :'tracking_category' => :'tracking_category',
@@ -56,7 +60,7 @@ module MergeAccountingClient
56
60
  :'account' => :'account',
57
61
  :'contact' => :'contact',
58
62
  :'description' => :'description',
59
- :'remote_id' => :'remote_id',
63
+ :'exchange_rate' => :'exchange_rate',
60
64
  :'integration_params' => :'integration_params',
61
65
  :'linked_account_params' => :'linked_account_params'
62
66
  }
@@ -70,6 +74,7 @@ module MergeAccountingClient
70
74
  # Attribute type mapping.
71
75
  def self.openapi_types
72
76
  {
77
+ :'remote_id' => :'String',
73
78
  :'item' => :'String',
74
79
  :'net_amount' => :'Float',
75
80
  :'tracking_category' => :'String',
@@ -78,7 +83,7 @@ module MergeAccountingClient
78
83
  :'account' => :'String',
79
84
  :'contact' => :'String',
80
85
  :'description' => :'String',
81
- :'remote_id' => :'String',
86
+ :'exchange_rate' => :'String',
82
87
  :'integration_params' => :'Hash<String, Object>',
83
88
  :'linked_account_params' => :'Hash<String, Object>'
84
89
  }
@@ -87,6 +92,7 @@ module MergeAccountingClient
87
92
  # List of attributes with nullable: true
88
93
  def self.openapi_nullable
89
94
  Set.new([
95
+ :'remote_id',
90
96
  :'item',
91
97
  :'net_amount',
92
98
  :'tracking_category',
@@ -94,7 +100,7 @@ module MergeAccountingClient
94
100
  :'account',
95
101
  :'contact',
96
102
  :'description',
97
- :'remote_id',
103
+ :'exchange_rate',
98
104
  :'integration_params',
99
105
  :'linked_account_params'
100
106
  ])
@@ -115,6 +121,10 @@ module MergeAccountingClient
115
121
  h[k.to_sym] = v
116
122
  }
117
123
 
124
+ if attributes.key?(:'remote_id')
125
+ self.remote_id = attributes[:'remote_id']
126
+ end
127
+
118
128
  if attributes.key?(:'item')
119
129
  self.item = attributes[:'item']
120
130
  end
@@ -149,8 +159,8 @@ module MergeAccountingClient
149
159
  self.description = attributes[:'description']
150
160
  end
151
161
 
152
- if attributes.key?(:'remote_id')
153
- self.remote_id = attributes[:'remote_id']
162
+ if attributes.key?(:'exchange_rate')
163
+ self.exchange_rate = attributes[:'exchange_rate']
154
164
  end
155
165
 
156
166
  if attributes.key?(:'integration_params')
@@ -170,20 +180,38 @@ module MergeAccountingClient
170
180
  # @return Array for valid properties with the reasons
171
181
  def list_invalid_properties
172
182
  invalid_properties = Array.new
183
+ pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
184
+ if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
185
+ invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
186
+ end
187
+
173
188
  invalid_properties
174
189
  end
175
190
 
176
191
  # Check to see if the all the properties in the model are valid
177
192
  # @return true if the model is valid
178
193
  def valid?
194
+ return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
179
195
  true
180
196
  end
181
197
 
198
+ # Custom attribute writer method with validation
199
+ # @param [Object] exchange_rate Value to be assigned
200
+ def exchange_rate=(exchange_rate)
201
+ pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
202
+ if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
203
+ fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
204
+ end
205
+
206
+ @exchange_rate = exchange_rate
207
+ end
208
+
182
209
  # Checks equality by comparing each attribute.
183
210
  # @param [Object] Object to be compared
184
211
  def ==(o)
185
212
  return true if self.equal?(o)
186
213
  self.class == o.class &&
214
+ remote_id == o.remote_id &&
187
215
  item == o.item &&
188
216
  net_amount == o.net_amount &&
189
217
  tracking_category == o.tracking_category &&
@@ -192,7 +220,7 @@ module MergeAccountingClient
192
220
  account == o.account &&
193
221
  contact == o.contact &&
194
222
  description == o.description &&
195
- remote_id == o.remote_id &&
223
+ exchange_rate == o.exchange_rate &&
196
224
  integration_params == o.integration_params &&
197
225
  linked_account_params == o.linked_account_params
198
226
  end
@@ -206,7 +234,7 @@ module MergeAccountingClient
206
234
  # Calculates hash code according to all attributes.
207
235
  # @return [Integer] Hash code
208
236
  def hash
209
- [item, net_amount, tracking_category, tracking_categories, company, account, contact, description, remote_id, integration_params, linked_account_params].hash
237
+ [remote_id, item, net_amount, tracking_category, tracking_categories, company, account, contact, description, exchange_rate, integration_params, linked_account_params].hash
210
238
  end
211
239
 
212
240
  # Builds the object from hash
@@ -172,7 +172,7 @@ module MergeAccountingClient
172
172
  def list_invalid_properties
173
173
  invalid_properties = Array.new
174
174
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
175
- if !@exchange_rate.nil? && @exchange_rate !~ pattern
175
+ if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
176
176
  invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
177
177
  end
178
178
 
@@ -182,7 +182,7 @@ module MergeAccountingClient
182
182
  # Check to see if the all the properties in the model are valid
183
183
  # @return true if the model is valid
184
184
  def valid?
185
- return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
185
+ return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
186
186
  true
187
187
  end
188
188
 
@@ -190,7 +190,7 @@ module MergeAccountingClient
190
190
  # @param [Object] exchange_rate Value to be assigned
191
191
  def exchange_rate=(exchange_rate)
192
192
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
193
- if !exchange_rate.nil? && exchange_rate !~ pattern
193
+ if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
194
194
  fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
195
195
  end
196
196
 
@@ -289,7 +289,7 @@ module MergeAccountingClient
289
289
  def list_invalid_properties
290
290
  invalid_properties = Array.new
291
291
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
292
- if !@exchange_rate.nil? && @exchange_rate !~ pattern
292
+ if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
293
293
  invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
294
294
  end
295
295
 
@@ -299,7 +299,7 @@ module MergeAccountingClient
299
299
  # Check to see if the all the properties in the model are valid
300
300
  # @return true if the model is valid
301
301
  def valid?
302
- return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
302
+ return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
303
303
  true
304
304
  end
305
305
 
@@ -307,7 +307,7 @@ module MergeAccountingClient
307
307
  # @param [Object] exchange_rate Value to be assigned
308
308
  def exchange_rate=(exchange_rate)
309
309
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
310
- if !exchange_rate.nil? && exchange_rate !~ pattern
310
+ if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
311
311
  fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
312
312
  end
313
313