merge_accounting_client 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +16 -0
  3. data/README.md +10 -5
  4. data/docs/Account.md +1 -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 +1 -1
  12. data/docs/BalanceSheetsApi.md +2 -2
  13. data/docs/CashFlowStatement.md +1 -1
  14. data/docs/CashFlowStatementsApi.md +2 -2
  15. data/docs/CompanyInfo.md +1 -1
  16. data/docs/CompanyInfoApi.md +2 -2
  17. data/docs/Contact.md +1 -1
  18. data/docs/ContactsApi.md +7 -3
  19. data/docs/CreditNote.md +7 -1
  20. data/docs/CreditNoteLineItem.md +38 -0
  21. data/docs/CreditNotesApi.md +7 -3
  22. data/docs/DataPassthroughRequest.md +3 -1
  23. data/docs/EndUserDetailsRequest.md +9 -7
  24. data/docs/Expense.md +1 -1
  25. data/docs/ExpensesApi.md +2 -2
  26. data/docs/IncomeStatement.md +1 -1
  27. data/docs/IncomeStatementsApi.md +2 -2
  28. data/docs/InvoiceLineItem.md +0 -2
  29. data/docs/InvoicesApi.md +8 -4
  30. data/docs/Item.md +1 -1
  31. data/docs/ItemsApi.md +7 -3
  32. data/docs/JournalEntriesApi.md +2 -2
  33. data/docs/LinkToken.md +3 -1
  34. data/docs/LinkedAccountsApi.md +2 -0
  35. data/docs/PaginatedTransactionList.md +22 -0
  36. data/docs/Payment.md +1 -1
  37. data/docs/PaymentsApi.md +2 -2
  38. data/docs/PurchaseOrder.md +8 -2
  39. data/docs/PurchaseOrderLineItem.md +9 -1
  40. data/docs/PurchaseOrdersApi.md +7 -3
  41. data/docs/RemoteResponse.md +2 -0
  42. data/docs/SyncStatusApi.md +1 -1
  43. data/docs/TaxRate.md +1 -1
  44. data/docs/TaxRatesApi.md +2 -2
  45. data/docs/TrackingCategoriesApi.md +7 -3
  46. data/docs/TrackingCategory.md +1 -1
  47. data/docs/Transaction.md +40 -0
  48. data/docs/TransactionLineItem.md +34 -0
  49. data/docs/TransactionsApi.md +181 -0
  50. data/docs/VendorCredit.md +1 -1
  51. data/docs/VendorCreditsApi.md +2 -2
  52. data/lib/merge_accounting_client/api/accounts_api.rb +16 -2
  53. data/lib/merge_accounting_client/api/addresses_api.rb +7 -0
  54. data/lib/merge_accounting_client/api/attachments_api.rb +2 -2
  55. data/lib/merge_accounting_client/api/balance_sheets_api.rb +2 -2
  56. data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +2 -2
  57. data/lib/merge_accounting_client/api/company_info_api.rb +2 -2
  58. data/lib/merge_accounting_client/api/contacts_api.rb +16 -2
  59. data/lib/merge_accounting_client/api/credit_notes_api.rb +16 -2
  60. data/lib/merge_accounting_client/api/expenses_api.rb +2 -2
  61. data/lib/merge_accounting_client/api/income_statements_api.rb +2 -2
  62. data/lib/merge_accounting_client/api/invoices_api.rb +17 -3
  63. data/lib/merge_accounting_client/api/items_api.rb +16 -2
  64. data/lib/merge_accounting_client/api/journal_entries_api.rb +2 -2
  65. data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -0
  66. data/lib/merge_accounting_client/api/payments_api.rb +2 -2
  67. data/lib/merge_accounting_client/api/purchase_orders_api.rb +16 -2
  68. data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
  69. data/lib/merge_accounting_client/api/tax_rates_api.rb +2 -2
  70. data/lib/merge_accounting_client/api/tracking_categories_api.rb +16 -2
  71. data/lib/merge_accounting_client/api/transactions_api.rb +196 -0
  72. data/lib/merge_accounting_client/api/vendor_credits_api.rb +2 -2
  73. data/lib/merge_accounting_client/models/account.rb +1 -1
  74. data/lib/merge_accounting_client/models/account_details.rb +15 -4
  75. data/lib/merge_accounting_client/models/account_details_and_actions.rb +12 -1
  76. data/lib/merge_accounting_client/models/account_details_and_actions_status_enum.rb +17 -7
  77. data/lib/merge_accounting_client/models/account_status_enum.rb +17 -7
  78. data/lib/merge_accounting_client/models/accounting_attachment.rb +1 -1
  79. data/lib/merge_accounting_client/models/address_type_enum.rb +17 -7
  80. data/lib/merge_accounting_client/models/balance_sheet.rb +1 -1
  81. data/lib/merge_accounting_client/models/cash_flow_statement.rb +1 -1
  82. data/lib/merge_accounting_client/models/categories_enum.rb +17 -7
  83. data/lib/merge_accounting_client/models/category_enum.rb +17 -7
  84. data/lib/merge_accounting_client/models/classification_enum.rb +17 -7
  85. data/lib/merge_accounting_client/models/company_info.rb +1 -1
  86. data/lib/merge_accounting_client/models/contact.rb +1 -1
  87. data/lib/merge_accounting_client/models/country_enum.rb +17 -7
  88. data/lib/merge_accounting_client/models/credit_note.rb +35 -2
  89. data/lib/merge_accounting_client/models/credit_note_line_item.rb +380 -0
  90. data/lib/merge_accounting_client/models/credit_note_status_enum.rb +17 -7
  91. data/lib/merge_accounting_client/models/currency_enum.rb +17 -7
  92. data/lib/merge_accounting_client/models/data_passthrough_request.rb +14 -5
  93. data/lib/merge_accounting_client/models/encoding_enum.rb +18 -7
  94. data/lib/merge_accounting_client/models/end_user_details_request.rb +28 -11
  95. data/lib/merge_accounting_client/models/expense.rb +1 -1
  96. data/lib/merge_accounting_client/models/income_statement.rb +1 -1
  97. data/lib/merge_accounting_client/models/invoice_line_item.rb +1 -13
  98. data/lib/merge_accounting_client/models/invoice_type_enum.rb +17 -7
  99. data/lib/merge_accounting_client/models/issue_status_enum.rb +17 -7
  100. data/lib/merge_accounting_client/models/item.rb +1 -1
  101. data/lib/merge_accounting_client/models/link_token.rb +13 -4
  102. data/lib/merge_accounting_client/models/method_enum.rb +17 -7
  103. data/lib/merge_accounting_client/models/paginated_transaction_list.rb +240 -0
  104. data/lib/merge_accounting_client/models/payment.rb +1 -1
  105. data/lib/merge_accounting_client/models/purchase_order.rb +35 -2
  106. data/lib/merge_accounting_client/models/purchase_order_line_item.rb +83 -5
  107. data/lib/merge_accounting_client/models/purchase_order_status_enum.rb +17 -7
  108. data/lib/merge_accounting_client/models/remote_response.rb +13 -2
  109. data/lib/merge_accounting_client/models/request_format_enum.rb +17 -7
  110. data/lib/merge_accounting_client/models/state_enum.rb +17 -7
  111. data/lib/merge_accounting_client/models/status7d1_enum.rb +17 -7
  112. data/lib/merge_accounting_client/models/sync_status_status_enum.rb +18 -7
  113. data/lib/merge_accounting_client/models/tax_rate.rb +1 -1
  114. data/lib/merge_accounting_client/models/tracking_category.rb +1 -1
  115. data/lib/merge_accounting_client/models/transaction.rb +356 -0
  116. data/lib/merge_accounting_client/models/transaction_line_item.rb +358 -0
  117. data/lib/merge_accounting_client/models/vendor_credit.rb +1 -1
  118. data/lib/merge_accounting_client/version.rb +1 -1
  119. data/lib/merge_accounting_client.rb +5 -1
  120. data/merge_accounting_client.gemspec +1 -1
  121. data/spec/api/accounts_api_spec.rb +3 -1
  122. data/spec/api/addresses_api_spec.rb +1 -0
  123. data/spec/api/attachments_api_spec.rb +1 -1
  124. data/spec/api/balance_sheets_api_spec.rb +1 -1
  125. data/spec/api/cash_flow_statements_api_spec.rb +1 -1
  126. data/spec/api/company_info_api_spec.rb +1 -1
  127. data/spec/api/contacts_api_spec.rb +3 -1
  128. data/spec/api/credit_notes_api_spec.rb +3 -1
  129. data/spec/api/expenses_api_spec.rb +1 -1
  130. data/spec/api/income_statements_api_spec.rb +1 -1
  131. data/spec/api/invoices_api_spec.rb +3 -1
  132. data/spec/api/items_api_spec.rb +3 -1
  133. data/spec/api/journal_entries_api_spec.rb +1 -1
  134. data/spec/api/linked_accounts_api_spec.rb +1 -0
  135. data/spec/api/payments_api_spec.rb +1 -1
  136. data/spec/api/purchase_orders_api_spec.rb +3 -1
  137. data/spec/api/sync_status_api_spec.rb +1 -1
  138. data/spec/api/tax_rates_api_spec.rb +1 -1
  139. data/spec/api/tracking_categories_api_spec.rb +3 -1
  140. data/spec/api/transactions_api_spec.rb +70 -0
  141. data/spec/api/vendor_credits_api_spec.rb +1 -1
  142. data/spec/models/account_details_and_actions_spec.rb +6 -0
  143. data/spec/models/account_details_spec.rb +6 -0
  144. data/spec/models/credit_note_line_item_spec.rb +94 -0
  145. data/spec/models/credit_note_spec.rb +18 -0
  146. data/spec/models/data_passthrough_request_spec.rb +6 -0
  147. data/spec/models/end_user_details_request_spec.rb +6 -0
  148. data/spec/models/invoice_line_item_spec.rb +0 -6
  149. data/spec/models/link_token_spec.rb +6 -0
  150. data/spec/models/paginated_transaction_list_spec.rb +46 -0
  151. data/spec/models/purchase_order_line_item_spec.rb +24 -0
  152. data/spec/models/purchase_order_spec.rb +18 -0
  153. data/spec/models/remote_response_spec.rb +6 -0
  154. data/spec/models/transaction_line_item_spec.rb +82 -0
  155. data/spec/models/transaction_spec.rb +100 -0
  156. metadata +132 -111
@@ -26,7 +26,7 @@ module MergeAccountingClient
26
26
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
27
27
  # @option opts [String] :cursor The pagination cursor value.
28
28
  # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
29
- # @option opts [Boolean] :include_deleted_data Whether to include data that was deleted in the third-party service.
29
+ # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
30
30
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
31
31
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
32
32
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
@@ -45,7 +45,7 @@ module MergeAccountingClient
45
45
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
46
46
  # @option opts [String] :cursor The pagination cursor value.
47
47
  # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
48
- # @option opts [Boolean] :include_deleted_data Whether to include data that was deleted in the third-party service.
48
+ # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
49
49
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
50
50
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
51
51
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
@@ -47,7 +47,7 @@ module MergeAccountingClient
47
47
  # The account's number.
48
48
  attr_accessor :account_number
49
49
 
50
- # Indicates whether or not this object has been deleted on the third-party.
50
+ # Indicates whether or not this object has been deleted by third party webhooks.
51
51
  attr_accessor :remote_was_deleted
52
52
 
53
53
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +33,9 @@ module MergeAccountingClient
33
33
 
34
34
  attr_accessor :webhook_listener_url
35
35
 
36
+ # Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
37
+ attr_accessor :is_duplicate
38
+
36
39
  # Attribute mapping from ruby-style variable name to JSON key.
37
40
  def self.attribute_map
38
41
  {
@@ -44,7 +47,8 @@ module MergeAccountingClient
44
47
  :'end_user_organization_name' => :'end_user_organization_name',
45
48
  :'end_user_email_address' => :'end_user_email_address',
46
49
  :'status' => :'status',
47
- :'webhook_listener_url' => :'webhook_listener_url'
50
+ :'webhook_listener_url' => :'webhook_listener_url',
51
+ :'is_duplicate' => :'is_duplicate'
48
52
  }
49
53
  end
50
54
 
@@ -64,7 +68,8 @@ module MergeAccountingClient
64
68
  :'end_user_organization_name' => :'String',
65
69
  :'end_user_email_address' => :'String',
66
70
  :'status' => :'String',
67
- :'webhook_listener_url' => :'String'
71
+ :'webhook_listener_url' => :'String',
72
+ :'is_duplicate' => :'Boolean'
68
73
  }
69
74
  end
70
75
 
@@ -72,6 +77,7 @@ module MergeAccountingClient
72
77
  def self.openapi_nullable
73
78
  Set.new([
74
79
  :'category',
80
+ :'is_duplicate'
75
81
  ])
76
82
  end
77
83
 
@@ -125,6 +131,10 @@ module MergeAccountingClient
125
131
  if attributes.key?(:'webhook_listener_url')
126
132
  self.webhook_listener_url = attributes[:'webhook_listener_url']
127
133
  end
134
+
135
+ if attributes.key?(:'is_duplicate')
136
+ self.is_duplicate = attributes[:'is_duplicate']
137
+ end
128
138
  end
129
139
 
130
140
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -153,7 +163,8 @@ module MergeAccountingClient
153
163
  end_user_organization_name == o.end_user_organization_name &&
154
164
  end_user_email_address == o.end_user_email_address &&
155
165
  status == o.status &&
156
- webhook_listener_url == o.webhook_listener_url
166
+ webhook_listener_url == o.webhook_listener_url &&
167
+ is_duplicate == o.is_duplicate
157
168
  end
158
169
 
159
170
  # @see the `==` method
@@ -165,7 +176,7 @@ module MergeAccountingClient
165
176
  # Calculates hash code according to all attributes.
166
177
  # @return [Integer] Hash code
167
178
  def hash
168
- [id, integration, integration_slug, category, end_user_origin_id, end_user_organization_name, end_user_email_address, status, webhook_listener_url].hash
179
+ [id, integration, integration_slug, category, end_user_origin_id, end_user_organization_name, end_user_email_address, status, webhook_listener_url, is_duplicate].hash
169
180
  end
170
181
 
171
182
  # Builds the object from hash
@@ -32,6 +32,9 @@ module MergeAccountingClient
32
32
 
33
33
  attr_accessor :webhook_listener_url
34
34
 
35
+ # Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
36
+ attr_accessor :is_duplicate
37
+
35
38
  attr_accessor :integration
36
39
 
37
40
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -45,6 +48,7 @@ module MergeAccountingClient
45
48
  :'end_user_organization_name' => :'end_user_organization_name',
46
49
  :'end_user_email_address' => :'end_user_email_address',
47
50
  :'webhook_listener_url' => :'webhook_listener_url',
51
+ :'is_duplicate' => :'is_duplicate',
48
52
  :'integration' => :'integration'
49
53
  }
50
54
  end
@@ -65,6 +69,7 @@ module MergeAccountingClient
65
69
  :'end_user_organization_name' => :'String',
66
70
  :'end_user_email_address' => :'String',
67
71
  :'webhook_listener_url' => :'String',
72
+ :'is_duplicate' => :'Boolean',
68
73
  :'integration' => :'AccountDetailsAndActionsIntegration'
69
74
  }
70
75
  end
@@ -72,6 +77,7 @@ module MergeAccountingClient
72
77
  # List of attributes with nullable: true
73
78
  def self.openapi_nullable
74
79
  Set.new([
80
+ :'is_duplicate',
75
81
  ])
76
82
  end
77
83
 
@@ -122,6 +128,10 @@ module MergeAccountingClient
122
128
  self.webhook_listener_url = attributes[:'webhook_listener_url']
123
129
  end
124
130
 
131
+ if attributes.key?(:'is_duplicate')
132
+ self.is_duplicate = attributes[:'is_duplicate']
133
+ end
134
+
125
135
  if attributes.key?(:'integration')
126
136
  self.integration = attributes[:'integration']
127
137
  end
@@ -178,6 +188,7 @@ module MergeAccountingClient
178
188
  end_user_organization_name == o.end_user_organization_name &&
179
189
  end_user_email_address == o.end_user_email_address &&
180
190
  webhook_listener_url == o.webhook_listener_url &&
191
+ is_duplicate == o.is_duplicate &&
181
192
  integration == o.integration
182
193
  end
183
194
 
@@ -190,7 +201,7 @@ module MergeAccountingClient
190
201
  # Calculates hash code according to all attributes.
191
202
  # @return [Integer] Hash code
192
203
  def hash
193
- [id, category, status, status_detail, end_user_origin_id, end_user_organization_name, end_user_email_address, webhook_listener_url, integration].hash
204
+ [id, category, status, status_detail, end_user_origin_id, end_user_organization_name, end_user_email_address, webhook_listener_url, is_duplicate, integration].hash
194
205
  end
195
206
 
196
207
  # Builds the object from hash
@@ -19,18 +19,28 @@ module MergeAccountingClient
19
19
  INCOMPLETE = "INCOMPLETE".freeze
20
20
  RELINK_NEEDED = "RELINK_NEEDED".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 ["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", ].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
@@ -19,18 +19,28 @@ module MergeAccountingClient
19
19
  PENDING = "PENDING".freeze
20
20
  INACTIVE = "INACTIVE".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 ["ACTIVE", "PENDING", "INACTIVE", ].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
@@ -29,7 +29,7 @@ module MergeAccountingClient
29
29
  # The attachment's url.
30
30
  attr_accessor :file_url
31
31
 
32
- # Indicates whether or not this object has been deleted on the third-party.
32
+ # Indicates whether or not this object has been deleted by third party webhooks.
33
33
  attr_accessor :remote_was_deleted
34
34
 
35
35
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -18,18 +18,28 @@ module MergeAccountingClient
18
18
  BILLING = "BILLING".freeze
19
19
  SHIPPING = "SHIPPING".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 ["BILLING", "SHIPPING", ].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
@@ -41,7 +41,7 @@ module MergeAccountingClient
41
41
  # The time that balance sheet was generated by the accounting system.
42
42
  attr_accessor :remote_generated_at
43
43
 
44
- # Indicates whether or not this object has been deleted on the third-party.
44
+ # Indicates whether or not this object has been deleted by third party webhooks.
45
45
  attr_accessor :remote_was_deleted
46
46
 
47
47
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -47,7 +47,7 @@ module MergeAccountingClient
47
47
  # The time that cash flow statement was generated by the accounting system.
48
48
  attr_accessor :remote_generated_at
49
49
 
50
- # Indicates whether or not this object has been deleted on the third-party.
50
+ # Indicates whether or not this object has been deleted by third party webhooks.
51
51
  attr_accessor :remote_was_deleted
52
52
 
53
53
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -21,18 +21,28 @@ module MergeAccountingClient
21
21
  TICKETING = "ticketing".freeze
22
22
  CRM = "crm".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 ["hris", "ats", "accounting", "ticketing", "crm", ].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
@@ -21,18 +21,28 @@ module MergeAccountingClient
21
21
  TICKETING = "ticketing".freeze
22
22
  CRM = "crm".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 ["hris", "ats", "accounting", "ticketing", "crm", ].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
@@ -21,18 +21,28 @@ module MergeAccountingClient
21
21
  LIABILITY = "LIABILITY".freeze
22
22
  REVENUE = "REVENUE".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 ["ASSET", "EQUITY", "EXPENSE", "LIABILITY", "REVENUE", ].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
@@ -51,7 +51,7 @@ module MergeAccountingClient
51
51
 
52
52
  attr_accessor :phone_numbers
53
53
 
54
- # Indicates whether or not this object has been deleted on the third-party.
54
+ # Indicates whether or not this object has been deleted by third party webhooks.
55
55
  attr_accessor :remote_was_deleted
56
56
 
57
57
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -53,7 +53,7 @@ module MergeAccountingClient
53
53
  # `AccountingPhoneNumber` object for the given `Contacts` object.
54
54
  attr_accessor :phone_numbers
55
55
 
56
- # Indicates whether or not this object has been deleted on the third-party.
56
+ # Indicates whether or not this object has been deleted by third party webhooks.
57
57
  attr_accessor :remote_was_deleted
58
58
 
59
59
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -265,18 +265,28 @@ module MergeAccountingClient
265
265
  ZM = "ZM".freeze
266
266
  ZW = "ZW".freeze
267
267
 
268
- # Builds the enum from string
269
- # @param [String] The enum value in the form of the string
270
- # @return [String] The enum value
271
- def self.build_from_hash(value)
272
- new.build_from_hash(value)
273
- end
268
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
269
+
270
+ attr_accessor :value
271
+ attr_accessor :raw_value
274
272
 
275
273
  # Builds the enum from string
276
274
  # @param [String] The enum value in the form of the string
277
275
  # @return [String] The enum value
278
276
  def build_from_hash(value)
279
- value
277
+ @raw_value = value
278
+ if ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "SZ", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MK", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "KR", "SS", "ES", "LK", "SD", "SR", "SJ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW", ].include? value
279
+ @value = value
280
+ else
281
+ @value = MERGE_NONSTANDARD_VALUE
282
+ end
283
+
284
+ self
285
+ end
286
+
287
+ def self.build_from_hash(value)
288
+ IssueStatusEnum.new.build_from_hash(value)
280
289
  end
281
290
  end
291
+
282
292
  end
@@ -29,12 +29,20 @@ module MergeAccountingClient
29
29
  # The credit note's status.
30
30
  attr_accessor :status
31
31
 
32
+ # The credit note's number.
33
+ attr_accessor :number
34
+
35
+ # The credit note's contact.
36
+ attr_accessor :contact
37
+
32
38
  # The credit note's total amount.
33
39
  attr_accessor :total_amount
34
40
 
35
41
  # The credit note's remaining credit.
36
42
  attr_accessor :remaining_credit
37
43
 
44
+ attr_accessor :line_items
45
+
38
46
  # The credit note's currency.
39
47
  attr_accessor :currency
40
48
 
@@ -47,7 +55,7 @@ module MergeAccountingClient
47
55
  # Array of `Payment` object IDs
48
56
  attr_accessor :payments
49
57
 
50
- # Indicates whether or not this object has been deleted on the third-party.
58
+ # Indicates whether or not this object has been deleted by third party webhooks.
51
59
  attr_accessor :remote_was_deleted
52
60
 
53
61
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -58,8 +66,11 @@ module MergeAccountingClient
58
66
  :'remote_data' => :'remote_data',
59
67
  :'transaction_date' => :'transaction_date',
60
68
  :'status' => :'status',
69
+ :'number' => :'number',
70
+ :'contact' => :'contact',
61
71
  :'total_amount' => :'total_amount',
62
72
  :'remaining_credit' => :'remaining_credit',
73
+ :'line_items' => :'line_items',
63
74
  :'currency' => :'currency',
64
75
  :'remote_created_at' => :'remote_created_at',
65
76
  :'remote_updated_at' => :'remote_updated_at',
@@ -81,8 +92,11 @@ module MergeAccountingClient
81
92
  :'remote_data' => :'Array<RemoteData>',
82
93
  :'transaction_date' => :'Time',
83
94
  :'status' => :'CreditNoteStatusEnum',
95
+ :'number' => :'String',
96
+ :'contact' => :'String',
84
97
  :'total_amount' => :'Float',
85
98
  :'remaining_credit' => :'Float',
99
+ :'line_items' => :'Array<CreditNoteLineItem>',
86
100
  :'currency' => :'CurrencyEnum',
87
101
  :'remote_created_at' => :'Time',
88
102
  :'remote_updated_at' => :'Time',
@@ -98,6 +112,8 @@ module MergeAccountingClient
98
112
  :'remote_data',
99
113
  :'transaction_date',
100
114
  :'status',
115
+ :'number',
116
+ :'contact',
101
117
  :'total_amount',
102
118
  :'remaining_credit',
103
119
  :'currency',
@@ -143,6 +159,14 @@ module MergeAccountingClient
143
159
  self.status = attributes[:'status']
144
160
  end
145
161
 
162
+ if attributes.key?(:'number')
163
+ self.number = attributes[:'number']
164
+ end
165
+
166
+ if attributes.key?(:'contact')
167
+ self.contact = attributes[:'contact']
168
+ end
169
+
146
170
  if attributes.key?(:'total_amount')
147
171
  self.total_amount = attributes[:'total_amount']
148
172
  end
@@ -151,6 +175,12 @@ module MergeAccountingClient
151
175
  self.remaining_credit = attributes[:'remaining_credit']
152
176
  end
153
177
 
178
+ if attributes.key?(:'line_items')
179
+ if (value = attributes[:'line_items']).is_a?(Array)
180
+ self.line_items = value
181
+ end
182
+ end
183
+
154
184
  if attributes.key?(:'currency')
155
185
  self.currency = attributes[:'currency']
156
186
  end
@@ -197,8 +227,11 @@ module MergeAccountingClient
197
227
  remote_data == o.remote_data &&
198
228
  transaction_date == o.transaction_date &&
199
229
  status == o.status &&
230
+ number == o.number &&
231
+ contact == o.contact &&
200
232
  total_amount == o.total_amount &&
201
233
  remaining_credit == o.remaining_credit &&
234
+ line_items == o.line_items &&
202
235
  currency == o.currency &&
203
236
  remote_created_at == o.remote_created_at &&
204
237
  remote_updated_at == o.remote_updated_at &&
@@ -215,7 +248,7 @@ module MergeAccountingClient
215
248
  # Calculates hash code according to all attributes.
216
249
  # @return [Integer] Hash code
217
250
  def hash
218
- [id, remote_id, remote_data, transaction_date, status, total_amount, remaining_credit, currency, remote_created_at, remote_updated_at, payments, remote_was_deleted].hash
251
+ [id, remote_id, remote_data, transaction_date, status, number, contact, total_amount, remaining_credit, line_items, currency, remote_created_at, remote_updated_at, payments, remote_was_deleted].hash
219
252
  end
220
253
 
221
254
  # Builds the object from hash