merge_accounting_client 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +16 -0
  3. data/README.md +12 -5
  4. data/docs/Account.md +3 -1
  5. data/docs/AccountDetails.md +3 -1
  6. data/docs/AccountDetailsAndActions.md +2 -0
  7. data/docs/AccountingAttachment.md +1 -1
  8. data/docs/AccountsApi.md +7 -3
  9. data/docs/AddressesApi.md +3 -1
  10. data/docs/AttachmentsApi.md +2 -2
  11. data/docs/BalanceSheet.md +3 -1
  12. data/docs/BalanceSheetsApi.md +2 -2
  13. data/docs/CashFlowStatement.md +3 -1
  14. data/docs/CashFlowStatementsApi.md +2 -2
  15. data/docs/CategoryTypeEnum.md +15 -0
  16. data/docs/CompanyInfo.md +1 -1
  17. data/docs/CompanyInfoApi.md +2 -2
  18. data/docs/Contact.md +1 -1
  19. data/docs/ContactsApi.md +7 -3
  20. data/docs/CreditNote.md +7 -1
  21. data/docs/CreditNoteLineItem.md +38 -0
  22. data/docs/CreditNotesApi.md +7 -3
  23. data/docs/DataPassthroughRequest.md +3 -1
  24. data/docs/EndUserDetailsRequest.md +9 -7
  25. data/docs/Expense.md +1 -1
  26. data/docs/ExpensesApi.md +2 -2
  27. data/docs/IncomeStatement.md +3 -1
  28. data/docs/IncomeStatementsApi.md +2 -2
  29. data/docs/InvoiceLineItem.md +0 -2
  30. data/docs/InvoicesApi.md +8 -4
  31. data/docs/Item.md +1 -1
  32. data/docs/ItemsApi.md +7 -3
  33. data/docs/JournalEntriesApi.md +2 -2
  34. data/docs/JournalEntry.md +2 -0
  35. data/docs/JournalEntryRequest.md +2 -0
  36. data/docs/LinkToken.md +3 -1
  37. data/docs/LinkedAccountsApi.md +2 -0
  38. data/docs/PaginatedTransactionList.md +22 -0
  39. data/docs/Payment.md +1 -1
  40. data/docs/PaymentsApi.md +2 -2
  41. data/docs/PurchaseOrder.md +8 -2
  42. data/docs/PurchaseOrderLineItem.md +9 -1
  43. data/docs/PurchaseOrdersApi.md +7 -3
  44. data/docs/RemoteResponse.md +5 -1
  45. data/docs/ResponseTypeEnum.md +15 -0
  46. data/docs/SyncStatus.md +2 -2
  47. data/docs/SyncStatusApi.md +1 -1
  48. data/docs/TaxRate.md +1 -1
  49. data/docs/TaxRatesApi.md +2 -2
  50. data/docs/TrackingCategoriesApi.md +7 -3
  51. data/docs/TrackingCategory.md +3 -1
  52. data/docs/Transaction.md +40 -0
  53. data/docs/TransactionLineItem.md +34 -0
  54. data/docs/TransactionsApi.md +181 -0
  55. data/docs/VendorCredit.md +1 -1
  56. data/docs/VendorCreditsApi.md +2 -2
  57. data/lib/merge_accounting_client/api/accounts_api.rb +16 -2
  58. data/lib/merge_accounting_client/api/addresses_api.rb +7 -0
  59. data/lib/merge_accounting_client/api/attachments_api.rb +2 -2
  60. data/lib/merge_accounting_client/api/balance_sheets_api.rb +2 -2
  61. data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +2 -2
  62. data/lib/merge_accounting_client/api/company_info_api.rb +2 -2
  63. data/lib/merge_accounting_client/api/contacts_api.rb +16 -2
  64. data/lib/merge_accounting_client/api/credit_notes_api.rb +16 -2
  65. data/lib/merge_accounting_client/api/expenses_api.rb +2 -2
  66. data/lib/merge_accounting_client/api/income_statements_api.rb +2 -2
  67. data/lib/merge_accounting_client/api/invoices_api.rb +17 -3
  68. data/lib/merge_accounting_client/api/items_api.rb +16 -2
  69. data/lib/merge_accounting_client/api/journal_entries_api.rb +2 -2
  70. data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -0
  71. data/lib/merge_accounting_client/api/payments_api.rb +2 -2
  72. data/lib/merge_accounting_client/api/purchase_orders_api.rb +16 -2
  73. data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
  74. data/lib/merge_accounting_client/api/tax_rates_api.rb +2 -2
  75. data/lib/merge_accounting_client/api/tracking_categories_api.rb +16 -2
  76. data/lib/merge_accounting_client/api/transactions_api.rb +196 -0
  77. data/lib/merge_accounting_client/api/vendor_credits_api.rb +2 -2
  78. data/lib/merge_accounting_client/api_client.rb +3 -0
  79. data/lib/merge_accounting_client/models/account.rb +12 -2
  80. data/lib/merge_accounting_client/models/account_details.rb +15 -4
  81. data/lib/merge_accounting_client/models/account_details_and_actions.rb +12 -1
  82. data/lib/merge_accounting_client/models/account_details_and_actions_status_enum.rb +17 -7
  83. data/lib/merge_accounting_client/models/account_status_enum.rb +17 -7
  84. data/lib/merge_accounting_client/models/accounting_attachment.rb +1 -1
  85. data/lib/merge_accounting_client/models/address_type_enum.rb +17 -7
  86. data/lib/merge_accounting_client/models/balance_sheet.rb +13 -2
  87. data/lib/merge_accounting_client/models/cash_flow_statement.rb +13 -2
  88. data/lib/merge_accounting_client/models/categories_enum.rb +17 -7
  89. data/lib/merge_accounting_client/models/category_enum.rb +17 -7
  90. data/lib/merge_accounting_client/models/category_type_enum.rb +45 -0
  91. data/lib/merge_accounting_client/models/classification_enum.rb +17 -7
  92. data/lib/merge_accounting_client/models/company_info.rb +1 -1
  93. data/lib/merge_accounting_client/models/contact.rb +1 -1
  94. data/lib/merge_accounting_client/models/country_enum.rb +17 -7
  95. data/lib/merge_accounting_client/models/credit_note.rb +35 -2
  96. data/lib/merge_accounting_client/models/credit_note_line_item.rb +380 -0
  97. data/lib/merge_accounting_client/models/credit_note_status_enum.rb +17 -7
  98. data/lib/merge_accounting_client/models/currency_enum.rb +17 -7
  99. data/lib/merge_accounting_client/models/data_passthrough_request.rb +14 -5
  100. data/lib/merge_accounting_client/models/encoding_enum.rb +18 -7
  101. data/lib/merge_accounting_client/models/end_user_details_request.rb +28 -11
  102. data/lib/merge_accounting_client/models/expense.rb +1 -1
  103. data/lib/merge_accounting_client/models/income_statement.rb +13 -2
  104. data/lib/merge_accounting_client/models/invoice_line_item.rb +1 -13
  105. data/lib/merge_accounting_client/models/invoice_type_enum.rb +17 -7
  106. data/lib/merge_accounting_client/models/issue_status_enum.rb +17 -7
  107. data/lib/merge_accounting_client/models/item.rb +1 -1
  108. data/lib/merge_accounting_client/models/journal_entry.rb +12 -1
  109. data/lib/merge_accounting_client/models/journal_entry_request.rb +12 -1
  110. data/lib/merge_accounting_client/models/link_token.rb +13 -4
  111. data/lib/merge_accounting_client/models/method_enum.rb +17 -7
  112. data/lib/merge_accounting_client/models/paginated_transaction_list.rb +240 -0
  113. data/lib/merge_accounting_client/models/payment.rb +1 -1
  114. data/lib/merge_accounting_client/models/purchase_order.rb +35 -2
  115. data/lib/merge_accounting_client/models/purchase_order_line_item.rb +83 -5
  116. data/lib/merge_accounting_client/models/purchase_order_status_enum.rb +17 -7
  117. data/lib/merge_accounting_client/models/remote_data.rb +1 -1
  118. data/lib/merge_accounting_client/models/remote_response.rb +27 -10
  119. data/lib/merge_accounting_client/models/request_format_enum.rb +17 -7
  120. data/lib/merge_accounting_client/models/response_type_enum.rb +45 -0
  121. data/lib/merge_accounting_client/models/state_enum.rb +17 -7
  122. data/lib/merge_accounting_client/models/status7d1_enum.rb +17 -7
  123. data/lib/merge_accounting_client/models/sync_status.rb +0 -10
  124. data/lib/merge_accounting_client/models/sync_status_status_enum.rb +18 -7
  125. data/lib/merge_accounting_client/models/tax_rate.rb +1 -1
  126. data/lib/merge_accounting_client/models/tracking_category.rb +13 -2
  127. data/lib/merge_accounting_client/models/transaction.rb +357 -0
  128. data/lib/merge_accounting_client/models/transaction_line_item.rb +359 -0
  129. data/lib/merge_accounting_client/models/vendor_credit.rb +1 -1
  130. data/lib/merge_accounting_client/version.rb +1 -1
  131. data/lib/merge_accounting_client.rb +7 -1
  132. data/merge_accounting_client.gemspec +1 -1
  133. data/spec/api/accounts_api_spec.rb +3 -1
  134. data/spec/api/addresses_api_spec.rb +1 -0
  135. data/spec/api/attachments_api_spec.rb +1 -1
  136. data/spec/api/balance_sheets_api_spec.rb +1 -1
  137. data/spec/api/cash_flow_statements_api_spec.rb +1 -1
  138. data/spec/api/company_info_api_spec.rb +1 -1
  139. data/spec/api/contacts_api_spec.rb +3 -1
  140. data/spec/api/credit_notes_api_spec.rb +3 -1
  141. data/spec/api/expenses_api_spec.rb +1 -1
  142. data/spec/api/income_statements_api_spec.rb +1 -1
  143. data/spec/api/invoices_api_spec.rb +3 -1
  144. data/spec/api/items_api_spec.rb +3 -1
  145. data/spec/api/journal_entries_api_spec.rb +1 -1
  146. data/spec/api/linked_accounts_api_spec.rb +1 -0
  147. data/spec/api/payments_api_spec.rb +1 -1
  148. data/spec/api/purchase_orders_api_spec.rb +3 -1
  149. data/spec/api/sync_status_api_spec.rb +1 -1
  150. data/spec/api/tax_rates_api_spec.rb +1 -1
  151. data/spec/api/tracking_categories_api_spec.rb +3 -1
  152. data/spec/api/transactions_api_spec.rb +70 -0
  153. data/spec/api/vendor_credits_api_spec.rb +1 -1
  154. data/spec/models/account_details_and_actions_spec.rb +6 -0
  155. data/spec/models/account_details_spec.rb +6 -0
  156. data/spec/models/account_spec.rb +6 -0
  157. data/spec/models/balance_sheet_spec.rb +6 -0
  158. data/spec/models/cash_flow_statement_spec.rb +6 -0
  159. data/spec/models/category_type_enum_spec.rb +28 -0
  160. data/spec/models/credit_note_line_item_spec.rb +94 -0
  161. data/spec/models/credit_note_spec.rb +18 -0
  162. data/spec/models/data_passthrough_request_spec.rb +6 -0
  163. data/spec/models/end_user_details_request_spec.rb +6 -0
  164. data/spec/models/income_statement_spec.rb +6 -0
  165. data/spec/models/invoice_line_item_spec.rb +0 -6
  166. data/spec/models/journal_entry_request_spec.rb +6 -0
  167. data/spec/models/journal_entry_spec.rb +6 -0
  168. data/spec/models/link_token_spec.rb +6 -0
  169. data/spec/models/paginated_transaction_list_spec.rb +46 -0
  170. data/spec/models/purchase_order_line_item_spec.rb +24 -0
  171. data/spec/models/purchase_order_spec.rb +18 -0
  172. data/spec/models/remote_response_spec.rb +12 -0
  173. data/spec/models/response_type_enum_spec.rb +28 -0
  174. data/spec/models/tracking_category_spec.rb +6 -0
  175. data/spec/models/transaction_line_item_spec.rb +82 -0
  176. data/spec/models/transaction_spec.rb +100 -0
  177. metadata +136 -107
@@ -35,6 +35,15 @@ module MergeAccountingClient
35
35
  # The purchase order's delivery address.
36
36
  attr_accessor :delivery_address
37
37
 
38
+ # The purchase order's customer.
39
+ attr_accessor :customer
40
+
41
+ # The purchase_order's vendor.
42
+ attr_accessor :vendor
43
+
44
+ # A memo attached to the purchase order.
45
+ attr_accessor :memo
46
+
38
47
  # The purchase order's total amount.
39
48
  attr_accessor :total_amount
40
49
 
@@ -49,7 +58,7 @@ module MergeAccountingClient
49
58
  # When the third party's purchase order note was updated.
50
59
  attr_accessor :remote_updated_at
51
60
 
52
- # Indicates whether or not this object has been deleted on the third-party.
61
+ # Indicates whether or not this object has been deleted by third party webhooks.
53
62
  attr_accessor :remote_was_deleted
54
63
 
55
64
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -62,6 +71,9 @@ module MergeAccountingClient
62
71
  :'issue_date' => :'issue_date',
63
72
  :'delivery_date' => :'delivery_date',
64
73
  :'delivery_address' => :'delivery_address',
74
+ :'customer' => :'customer',
75
+ :'vendor' => :'vendor',
76
+ :'memo' => :'memo',
65
77
  :'total_amount' => :'total_amount',
66
78
  :'currency' => :'currency',
67
79
  :'line_items' => :'line_items',
@@ -86,6 +98,9 @@ module MergeAccountingClient
86
98
  :'issue_date' => :'Time',
87
99
  :'delivery_date' => :'Time',
88
100
  :'delivery_address' => :'String',
101
+ :'customer' => :'String',
102
+ :'vendor' => :'String',
103
+ :'memo' => :'String',
89
104
  :'total_amount' => :'Float',
90
105
  :'currency' => :'CurrencyEnum',
91
106
  :'line_items' => :'Array<PurchaseOrderLineItem>',
@@ -104,6 +119,9 @@ module MergeAccountingClient
104
119
  :'issue_date',
105
120
  :'delivery_date',
106
121
  :'delivery_address',
122
+ :'customer',
123
+ :'vendor',
124
+ :'memo',
107
125
  :'total_amount',
108
126
  :'currency',
109
127
  :'remote_created_at',
@@ -156,6 +174,18 @@ module MergeAccountingClient
156
174
  self.delivery_address = attributes[:'delivery_address']
157
175
  end
158
176
 
177
+ if attributes.key?(:'customer')
178
+ self.customer = attributes[:'customer']
179
+ end
180
+
181
+ if attributes.key?(:'vendor')
182
+ self.vendor = attributes[:'vendor']
183
+ end
184
+
185
+ if attributes.key?(:'memo')
186
+ self.memo = attributes[:'memo']
187
+ end
188
+
159
189
  if attributes.key?(:'total_amount')
160
190
  self.total_amount = attributes[:'total_amount']
161
191
  end
@@ -208,6 +238,9 @@ module MergeAccountingClient
208
238
  issue_date == o.issue_date &&
209
239
  delivery_date == o.delivery_date &&
210
240
  delivery_address == o.delivery_address &&
241
+ customer == o.customer &&
242
+ vendor == o.vendor &&
243
+ memo == o.memo &&
211
244
  total_amount == o.total_amount &&
212
245
  currency == o.currency &&
213
246
  line_items == o.line_items &&
@@ -225,7 +258,7 @@ module MergeAccountingClient
225
258
  # Calculates hash code according to all attributes.
226
259
  # @return [Integer] Hash code
227
260
  def hash
228
- [id, remote_id, remote_data, status, issue_date, delivery_date, delivery_address, total_amount, currency, line_items, remote_created_at, remote_updated_at, remote_was_deleted].hash
261
+ [id, remote_id, remote_data, status, issue_date, delivery_date, delivery_address, customer, vendor, memo, total_amount, currency, line_items, remote_created_at, remote_updated_at, remote_was_deleted].hash
229
262
  end
230
263
 
231
264
  # Builds the object from hash
@@ -27,13 +27,29 @@ module MergeAccountingClient
27
27
 
28
28
  attr_accessor :item
29
29
 
30
+ # The purchase order line item's account.
31
+ attr_accessor :account
32
+
33
+ # The purchase order line item's associated tracking category.
34
+ attr_accessor :tracking_category
35
+
36
+ # The purchase order line item's tax amount.
37
+ attr_accessor :tax_amount
38
+
39
+ # The purchase order line item's total amount.
40
+ attr_accessor :total_line_amount
41
+
30
42
  # Attribute mapping from ruby-style variable name to JSON key.
31
43
  def self.attribute_map
32
44
  {
33
45
  :'description' => :'description',
34
46
  :'unit_price' => :'unit_price',
35
47
  :'quantity' => :'quantity',
36
- :'item' => :'item'
48
+ :'item' => :'item',
49
+ :'account' => :'account',
50
+ :'tracking_category' => :'tracking_category',
51
+ :'tax_amount' => :'tax_amount',
52
+ :'total_line_amount' => :'total_line_amount'
37
53
  }
38
54
  end
39
55
 
@@ -48,7 +64,11 @@ module MergeAccountingClient
48
64
  :'description' => :'String',
49
65
  :'unit_price' => :'Float',
50
66
  :'quantity' => :'Float',
51
- :'item' => :'String'
67
+ :'item' => :'String',
68
+ :'account' => :'String',
69
+ :'tracking_category' => :'String',
70
+ :'tax_amount' => :'String',
71
+ :'total_line_amount' => :'String'
52
72
  }
53
73
  end
54
74
 
@@ -58,7 +78,11 @@ module MergeAccountingClient
58
78
  :'description',
59
79
  :'unit_price',
60
80
  :'quantity',
61
- :'item'
81
+ :'item',
82
+ :'account',
83
+ :'tracking_category',
84
+ :'tax_amount',
85
+ :'total_line_amount'
62
86
  ])
63
87
  end
64
88
 
@@ -92,21 +116,71 @@ module MergeAccountingClient
92
116
  if attributes.key?(:'item')
93
117
  self.item = attributes[:'item']
94
118
  end
119
+
120
+ if attributes.key?(:'account')
121
+ self.account = attributes[:'account']
122
+ end
123
+
124
+ if attributes.key?(:'tracking_category')
125
+ self.tracking_category = attributes[:'tracking_category']
126
+ end
127
+
128
+ if attributes.key?(:'tax_amount')
129
+ self.tax_amount = attributes[:'tax_amount']
130
+ end
131
+
132
+ if attributes.key?(:'total_line_amount')
133
+ self.total_line_amount = attributes[:'total_line_amount']
134
+ end
95
135
  end
96
136
 
97
137
  # Show invalid properties with the reasons. Usually used together with valid?
98
138
  # @return Array for valid properties with the reasons
99
139
  def list_invalid_properties
100
140
  invalid_properties = Array.new
141
+ pattern = Regexp.new(/^\d{0,32}(?:\.\d{0,16})?$/)
142
+ if !@tax_amount.nil? && @tax_amount !~ pattern
143
+ invalid_properties.push("invalid value for \"tax_amount\", must conform to the pattern #{pattern}.")
144
+ end
145
+
146
+ pattern = Regexp.new(/^\d{0,32}(?:\.\d{0,16})?$/)
147
+ if !@total_line_amount.nil? && @total_line_amount !~ pattern
148
+ invalid_properties.push("invalid value for \"total_line_amount\", must conform to the pattern #{pattern}.")
149
+ end
150
+
101
151
  invalid_properties
102
152
  end
103
153
 
104
154
  # Check to see if the all the properties in the model are valid
105
155
  # @return true if the model is valid
106
156
  def valid?
157
+ return false if !@tax_amount.nil? && @tax_amount !~ Regexp.new(/^\d{0,32}(?:\.\d{0,16})?$/)
158
+ return false if !@total_line_amount.nil? && @total_line_amount !~ Regexp.new(/^\d{0,32}(?:\.\d{0,16})?$/)
107
159
  true
108
160
  end
109
161
 
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] tax_amount Value to be assigned
164
+ def tax_amount=(tax_amount)
165
+ pattern = Regexp.new(/^\d{0,32}(?:\.\d{0,16})?$/)
166
+ if !tax_amount.nil? && tax_amount !~ pattern
167
+ fail ArgumentError, "invalid value for \"tax_amount\", must conform to the pattern #{pattern}."
168
+ end
169
+
170
+ @tax_amount = tax_amount
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] total_line_amount Value to be assigned
175
+ def total_line_amount=(total_line_amount)
176
+ pattern = Regexp.new(/^\d{0,32}(?:\.\d{0,16})?$/)
177
+ if !total_line_amount.nil? && total_line_amount !~ pattern
178
+ fail ArgumentError, "invalid value for \"total_line_amount\", must conform to the pattern #{pattern}."
179
+ end
180
+
181
+ @total_line_amount = total_line_amount
182
+ end
183
+
110
184
  # Checks equality by comparing each attribute.
111
185
  # @param [Object] Object to be compared
112
186
  def ==(o)
@@ -115,7 +189,11 @@ module MergeAccountingClient
115
189
  description == o.description &&
116
190
  unit_price == o.unit_price &&
117
191
  quantity == o.quantity &&
118
- item == o.item
192
+ item == o.item &&
193
+ account == o.account &&
194
+ tracking_category == o.tracking_category &&
195
+ tax_amount == o.tax_amount &&
196
+ total_line_amount == o.total_line_amount
119
197
  end
120
198
 
121
199
  # @see the `==` method
@@ -127,7 +205,7 @@ module MergeAccountingClient
127
205
  # Calculates hash code according to all attributes.
128
206
  # @return [Integer] Hash code
129
207
  def hash
130
- [description, unit_price, quantity, item].hash
208
+ [description, unit_price, quantity, item, account, tracking_category, tax_amount, total_line_amount].hash
131
209
  end
132
210
 
133
211
  # Builds the object from hash
@@ -21,18 +21,28 @@ module MergeAccountingClient
21
21
  BILLED = "BILLED".freeze
22
22
  DELETED = "DELETED".freeze
23
23
 
24
- # Builds the enum from string
25
- # @param [String] The enum value in the form of the string
26
- # @return [String] The enum value
27
- def self.build_from_hash(value)
28
- new.build_from_hash(value)
29
- end
24
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
25
+
26
+ attr_accessor :value
27
+ attr_accessor :raw_value
30
28
 
31
29
  # Builds the enum from string
32
30
  # @param [String] The enum value in the form of the string
33
31
  # @return [String] The enum value
34
32
  def build_from_hash(value)
35
- value
33
+ @raw_value = value
34
+ if ["DRAFT", "SUBMITTED", "AUTHORIZED", "BILLED", "DELETED", ].include? value
35
+ @value = value
36
+ else
37
+ @value = MERGE_NONSTANDARD_VALUE
38
+ end
39
+
40
+ self
41
+ end
42
+
43
+ def self.build_from_hash(value)
44
+ IssueStatusEnum.new.build_from_hash(value)
36
45
  end
37
46
  end
47
+
38
48
  end
@@ -36,7 +36,7 @@ module MergeAccountingClient
36
36
  def self.openapi_types
37
37
  {
38
38
  :'path' => :'String',
39
- :'data' => :'Hash<String, Object>'
39
+ :'data' => :'Hash<String, AnyType>'
40
40
  }
41
41
  end
42
42
 
@@ -24,6 +24,10 @@ module MergeAccountingClient
24
24
 
25
25
  attr_accessor :response
26
26
 
27
+ attr_accessor :response_headers
28
+
29
+ attr_accessor :response_type
30
+
27
31
  attr_accessor :headers
28
32
 
29
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +37,8 @@ module MergeAccountingClient
33
37
  :'path' => :'path',
34
38
  :'status' => :'status',
35
39
  :'response' => :'response',
40
+ :'response_headers' => :'response_headers',
41
+ :'response_type' => :'response_type',
36
42
  :'headers' => :'headers'
37
43
  }
38
44
  end
@@ -48,14 +54,17 @@ module MergeAccountingClient
48
54
  :'method' => :'String',
49
55
  :'path' => :'String',
50
56
  :'status' => :'Integer',
51
- :'response' => :'Hash<String, Object>',
52
- :'headers' => :'Hash<String, Object>'
57
+ :'response' => :'AnyType',
58
+ :'response_headers' => :'Hash<String, AnyType>',
59
+ :'response_type' => :'ResponseTypeEnum',
60
+ :'headers' => :'Hash<String, AnyType>'
53
61
  }
54
62
  end
55
63
 
56
64
  # List of attributes with nullable: true
57
65
  def self.openapi_nullable
58
66
  Set.new([
67
+ :'response',
59
68
  ])
60
69
  end
61
70
 
@@ -87,11 +96,19 @@ module MergeAccountingClient
87
96
  end
88
97
 
89
98
  if attributes.key?(:'response')
90
- if (value = attributes[:'response']).is_a?(Hash)
91
- self.response = value
99
+ self.response = attributes[:'response']
100
+ end
101
+
102
+ if attributes.key?(:'response_headers')
103
+ if (value = attributes[:'response_headers']).is_a?(Hash)
104
+ self.response_headers = value
92
105
  end
93
106
  end
94
107
 
108
+ if attributes.key?(:'response_type')
109
+ self.response_type = attributes[:'response_type']
110
+ end
111
+
95
112
  if attributes.key?(:'headers')
96
113
  if (value = attributes[:'headers']).is_a?(Hash)
97
114
  self.headers = value
@@ -115,10 +132,6 @@ module MergeAccountingClient
115
132
  invalid_properties.push('invalid value for "status", status cannot be nil.')
116
133
  end
117
134
 
118
- if @response.nil?
119
- invalid_properties.push('invalid value for "response", response cannot be nil.')
120
- end
121
-
122
135
  invalid_properties
123
136
  end
124
137
 
@@ -128,7 +141,6 @@ module MergeAccountingClient
128
141
  return false if @method.nil?
129
142
  return false if @path.nil?
130
143
  return false if @status.nil?
131
- return false if @response.nil?
132
144
  true
133
145
  end
134
146
 
@@ -141,6 +153,8 @@ module MergeAccountingClient
141
153
  path == o.path &&
142
154
  status == o.status &&
143
155
  response == o.response &&
156
+ response_headers == o.response_headers &&
157
+ response_type == o.response_type &&
144
158
  headers == o.headers
145
159
  end
146
160
 
@@ -153,7 +167,7 @@ module MergeAccountingClient
153
167
  # Calculates hash code according to all attributes.
154
168
  # @return [Integer] Hash code
155
169
  def hash
156
- [method, path, status, response, headers].hash
170
+ [method, path, status, response, response_headers, response_type, headers].hash
157
171
  end
158
172
 
159
173
  # Builds the object from hash
@@ -221,6 +235,9 @@ module MergeAccountingClient
221
235
  hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
222
236
  end
223
237
  end
238
+ when :AnyType
239
+ # Return AnyType response as Object directly
240
+ value
224
241
  else # model
225
242
  # models (e.g. Pet) or oneOf
226
243
  klass = MergeAccountingClient.const_get(type)
@@ -19,18 +19,28 @@ module MergeAccountingClient
19
19
  XML = "XML".freeze
20
20
  MULTIPART = "MULTIPART".freeze
21
21
 
22
- # Builds the enum from string
23
- # @param [String] The enum value in the form of the string
24
- # @return [String] The enum value
25
- def self.build_from_hash(value)
26
- new.build_from_hash(value)
27
- end
22
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
23
+
24
+ attr_accessor :value
25
+ attr_accessor :raw_value
28
26
 
29
27
  # Builds the enum from string
30
28
  # @param [String] The enum value in the form of the string
31
29
  # @return [String] The enum value
32
30
  def build_from_hash(value)
33
- value
31
+ @raw_value = value
32
+ if ["JSON", "XML", "MULTIPART", ].include? value
33
+ @value = value
34
+ else
35
+ @value = MERGE_NONSTANDARD_VALUE
36
+ end
37
+
38
+ self
39
+ end
40
+
41
+ def self.build_from_hash(value)
42
+ IssueStatusEnum.new.build_from_hash(value)
34
43
  end
35
44
  end
45
+
36
46
  end
@@ -0,0 +1,45 @@
1
+ =begin
2
+ #Merge Accounting API
3
+
4
+ #The unified API for building rich integrations with multiple Accounting & Finance platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeAccountingClient
17
+ class ResponseTypeEnum
18
+ JSON = "JSON".freeze
19
+ BASE64_GZIP = "BASE64_GZIP".freeze
20
+
21
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
22
+
23
+ attr_accessor :value
24
+ attr_accessor :raw_value
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
29
+ def build_from_hash(value)
30
+ @raw_value = value
31
+ if ["JSON", "BASE64_GZIP", ].include? value
32
+ @value = value
33
+ else
34
+ @value = MERGE_NONSTANDARD_VALUE
35
+ end
36
+
37
+ self
38
+ end
39
+
40
+ def self.build_from_hash(value)
41
+ IssueStatusEnum.new.build_from_hash(value)
42
+ end
43
+ end
44
+
45
+ end
@@ -75,18 +75,28 @@ module MergeAccountingClient
75
75
  WI = "WI".freeze
76
76
  WY = "WY".freeze
77
77
 
78
- # Builds the enum from string
79
- # @param [String] The enum value in the form of the string
80
- # @return [String] The enum value
81
- def self.build_from_hash(value)
82
- new.build_from_hash(value)
83
- end
78
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
79
+
80
+ attr_accessor :value
81
+ attr_accessor :raw_value
84
82
 
85
83
  # Builds the enum from string
86
84
  # @param [String] The enum value in the form of the string
87
85
  # @return [String] The enum value
88
86
  def build_from_hash(value)
89
- value
87
+ @raw_value = value
88
+ if ["AL", "AK", "AS", "AZ", "AR", "AA", "AE", "AP", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY", ].include? value
89
+ @value = value
90
+ else
91
+ @value = MERGE_NONSTANDARD_VALUE
92
+ end
93
+
94
+ self
95
+ end
96
+
97
+ def self.build_from_hash(value)
98
+ IssueStatusEnum.new.build_from_hash(value)
90
99
  end
91
100
  end
101
+
92
102
  end
@@ -18,18 +18,28 @@ module MergeAccountingClient
18
18
  ACTIVE = "ACTIVE".freeze
19
19
  ARCHIVED = "ARCHIVED".freeze
20
20
 
21
- # Builds the enum from string
22
- # @param [String] The enum value in the form of the string
23
- # @return [String] The enum value
24
- def self.build_from_hash(value)
25
- new.build_from_hash(value)
26
- end
21
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
22
+
23
+ attr_accessor :value
24
+ attr_accessor :raw_value
27
25
 
28
26
  # Builds the enum from string
29
27
  # @param [String] The enum value in the form of the string
30
28
  # @return [String] The enum value
31
29
  def build_from_hash(value)
32
- value
30
+ @raw_value = value
31
+ if ["ACTIVE", "ARCHIVED", ].include? value
32
+ @value = value
33
+ else
34
+ @value = MERGE_NONSTANDARD_VALUE
35
+ end
36
+
37
+ self
38
+ end
39
+
40
+ def self.build_from_hash(value)
41
+ IssueStatusEnum.new.build_from_hash(value)
33
42
  end
34
43
  end
44
+
35
45
  end
@@ -115,14 +115,6 @@ module MergeAccountingClient
115
115
  invalid_properties.push('invalid value for "model_id", model_id cannot be nil.')
116
116
  end
117
117
 
118
- if @last_sync_start.nil?
119
- invalid_properties.push('invalid value for "last_sync_start", last_sync_start cannot be nil.')
120
- end
121
-
122
- if @next_sync_start.nil?
123
- invalid_properties.push('invalid value for "next_sync_start", next_sync_start cannot be nil.')
124
- end
125
-
126
118
  if @status.nil?
127
119
  invalid_properties.push('invalid value for "status", status cannot be nil.')
128
120
  end
@@ -139,8 +131,6 @@ module MergeAccountingClient
139
131
  def valid?
140
132
  return false if @model_name.nil?
141
133
  return false if @model_id.nil?
142
- return false if @last_sync_start.nil?
143
- return false if @next_sync_start.nil?
144
134
  return false if @status.nil?
145
135
  return false if @is_initial_sync.nil?
146
136
  true
@@ -19,19 +19,30 @@ module MergeAccountingClient
19
19
  DONE = "DONE".freeze
20
20
  FAILED = "FAILED".freeze
21
21
  DISABLED = "DISABLED".freeze
22
+ PAUSED = "PAUSED".freeze
22
23
 
23
- # Builds the enum from string
24
- # @param [String] The enum value in the form of the string
25
- # @return [String] The enum value
26
- def self.build_from_hash(value)
27
- new.build_from_hash(value)
28
- end
24
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
25
+
26
+ attr_accessor :value
27
+ attr_accessor :raw_value
29
28
 
30
29
  # Builds the enum from string
31
30
  # @param [String] The enum value in the form of the string
32
31
  # @return [String] The enum value
33
32
  def build_from_hash(value)
34
- value
33
+ @raw_value = value
34
+ if ["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", ].include? value
35
+ @value = value
36
+ else
37
+ @value = MERGE_NONSTANDARD_VALUE
38
+ end
39
+
40
+ self
41
+ end
42
+
43
+ def self.build_from_hash(value)
44
+ IssueStatusEnum.new.build_from_hash(value)
35
45
  end
36
46
  end
47
+
37
48
  end
@@ -32,7 +32,7 @@ module MergeAccountingClient
32
32
  # The tax rate's effective tax rate.
33
33
  attr_accessor :effective_tax_rate
34
34
 
35
- # Indicates whether or not this object has been deleted on the third-party.
35
+ # Indicates whether or not this object has been deleted by third party webhooks.
36
36
  attr_accessor :remote_was_deleted
37
37
 
38
38
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -29,7 +29,10 @@ module MergeAccountingClient
29
29
  # The tracking category's status.
30
30
  attr_accessor :status
31
31
 
32
- # Indicates whether or not this object has been deleted on the third-party.
32
+ # The tracking category’s type.
33
+ attr_accessor :category_type
34
+
35
+ # Indicates whether or not this object has been deleted by third party webhooks.
33
36
  attr_accessor :remote_was_deleted
34
37
 
35
38
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -40,6 +43,7 @@ module MergeAccountingClient
40
43
  :'remote_data' => :'remote_data',
41
44
  :'name' => :'name',
42
45
  :'status' => :'status',
46
+ :'category_type' => :'category_type',
43
47
  :'remote_was_deleted' => :'remote_was_deleted'
44
48
  }
45
49
  end
@@ -57,6 +61,7 @@ module MergeAccountingClient
57
61
  :'remote_data' => :'Array<RemoteData>',
58
62
  :'name' => :'String',
59
63
  :'status' => :'Status7d1Enum',
64
+ :'category_type' => :'CategoryTypeEnum',
60
65
  :'remote_was_deleted' => :'Boolean'
61
66
  }
62
67
  end
@@ -68,6 +73,7 @@ module MergeAccountingClient
68
73
  :'remote_data',
69
74
  :'name',
70
75
  :'status',
76
+ :'category_type',
71
77
  ])
72
78
  end
73
79
 
@@ -108,6 +114,10 @@ module MergeAccountingClient
108
114
  self.status = attributes[:'status']
109
115
  end
110
116
 
117
+ if attributes.key?(:'category_type')
118
+ self.category_type = attributes[:'category_type']
119
+ end
120
+
111
121
  if attributes.key?(:'remote_was_deleted')
112
122
  self.remote_was_deleted = attributes[:'remote_was_deleted']
113
123
  end
@@ -136,6 +146,7 @@ module MergeAccountingClient
136
146
  remote_data == o.remote_data &&
137
147
  name == o.name &&
138
148
  status == o.status &&
149
+ category_type == o.category_type &&
139
150
  remote_was_deleted == o.remote_was_deleted
140
151
  end
141
152
 
@@ -148,7 +159,7 @@ module MergeAccountingClient
148
159
  # Calculates hash code according to all attributes.
149
160
  # @return [Integer] Hash code
150
161
  def hash
151
- [id, remote_id, remote_data, name, status, remote_was_deleted].hash
162
+ [id, remote_id, remote_data, name, status, category_type, remote_was_deleted].hash
152
163
  end
153
164
 
154
165
  # Builds the object from hash