merge_accounting_client 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -5
  3. data/docs/Account.md +3 -1
  4. data/docs/AccountingAttachment.md +3 -1
  5. data/docs/BalanceSheet.md +3 -1
  6. data/docs/CashFlowStatement.md +3 -1
  7. data/docs/CompanyInfo.md +3 -1
  8. data/docs/Contact.md +3 -1
  9. data/docs/CreditNote.md +3 -1
  10. data/docs/Expense.md +3 -1
  11. data/docs/ForceResyncApi.md +4 -4
  12. data/docs/IncomeStatement.md +3 -1
  13. data/docs/Invoice.md +3 -1
  14. data/docs/InvoiceLineItem.md +3 -1
  15. data/docs/InvoiceLineItemRequest.md +3 -1
  16. data/docs/Item.md +3 -1
  17. data/docs/JournalEntry.md +7 -3
  18. data/docs/JournalEntryRequest.md +3 -1
  19. data/docs/JournalLine.md +2 -0
  20. data/docs/JournalLineRequest.md +2 -0
  21. data/docs/LinkedAccountsApi.md +14 -14
  22. data/docs/PaginatedVendorCreditList.md +22 -0
  23. data/docs/Payment.md +3 -1
  24. data/docs/PurchaseOrder.md +3 -1
  25. data/docs/TaxRate.md +3 -1
  26. data/docs/TrackingCategory.md +3 -1
  27. data/docs/VendorCredit.md +36 -0
  28. data/docs/VendorCreditLine.md +26 -0
  29. data/docs/VendorCreditsApi.md +181 -0
  30. data/docs/WebhookReceiversApi.md +14 -16
  31. data/lib/merge_accounting_client/api/force_resync_api.rb +3 -3
  32. data/lib/merge_accounting_client/api/linked_accounts_api.rb +15 -15
  33. data/lib/merge_accounting_client/api/vendor_credits_api.rb +196 -0
  34. data/lib/merge_accounting_client/api/webhook_receivers_api.rb +23 -15
  35. data/lib/merge_accounting_client/models/account.rb +15 -5
  36. data/lib/merge_accounting_client/models/account_details_and_actions_status_enum.rb +0 -2
  37. data/lib/merge_accounting_client/models/account_status_enum.rb +0 -2
  38. data/lib/merge_accounting_client/models/accounting_attachment.rb +15 -5
  39. data/lib/merge_accounting_client/models/address_type_enum.rb +0 -2
  40. data/lib/merge_accounting_client/models/balance_sheet.rb +15 -5
  41. data/lib/merge_accounting_client/models/cash_flow_statement.rb +15 -5
  42. data/lib/merge_accounting_client/models/categories_enum.rb +1 -2
  43. data/lib/merge_accounting_client/models/category_enum.rb +1 -2
  44. data/lib/merge_accounting_client/models/classification_enum.rb +0 -2
  45. data/lib/merge_accounting_client/models/company_info.rb +14 -4
  46. data/lib/merge_accounting_client/models/contact.rb +14 -4
  47. data/lib/merge_accounting_client/models/country_enum.rb +0 -2
  48. data/lib/merge_accounting_client/models/credit_note.rb +14 -4
  49. data/lib/merge_accounting_client/models/credit_note_status_enum.rb +0 -2
  50. data/lib/merge_accounting_client/models/currency_enum.rb +0 -2
  51. data/lib/merge_accounting_client/models/encoding_enum.rb +0 -2
  52. data/lib/merge_accounting_client/models/expense.rb +14 -4
  53. data/lib/merge_accounting_client/models/income_statement.rb +15 -5
  54. data/lib/merge_accounting_client/models/invoice.rb +13 -4
  55. data/lib/merge_accounting_client/models/invoice_line_item.rb +15 -5
  56. data/lib/merge_accounting_client/models/invoice_line_item_request.rb +15 -5
  57. data/lib/merge_accounting_client/models/invoice_type_enum.rb +0 -2
  58. data/lib/merge_accounting_client/models/issue_status_enum.rb +0 -2
  59. data/lib/merge_accounting_client/models/item.rb +15 -5
  60. data/lib/merge_accounting_client/models/journal_entry.rb +30 -10
  61. data/lib/merge_accounting_client/models/journal_entry_request.rb +17 -6
  62. data/lib/merge_accounting_client/models/journal_line.rb +11 -1
  63. data/lib/merge_accounting_client/models/journal_line_request.rb +11 -1
  64. data/lib/merge_accounting_client/models/method_enum.rb +0 -2
  65. data/lib/merge_accounting_client/models/{paginated_webhook_receiver_list.rb → paginated_vendor_credit_list.rb} +4 -4
  66. data/lib/merge_accounting_client/models/payment.rb +15 -5
  67. data/lib/merge_accounting_client/models/purchase_order.rb +15 -5
  68. data/lib/merge_accounting_client/models/purchase_order_status_enum.rb +0 -2
  69. data/lib/merge_accounting_client/models/request_format_enum.rb +0 -2
  70. data/lib/merge_accounting_client/models/state_enum.rb +0 -2
  71. data/lib/merge_accounting_client/models/status7d1_enum.rb +0 -2
  72. data/lib/merge_accounting_client/models/sync_status_status_enum.rb +0 -2
  73. data/lib/merge_accounting_client/models/tax_rate.rb +15 -5
  74. data/lib/merge_accounting_client/models/tracking_category.rb +15 -5
  75. data/lib/merge_accounting_client/models/vendor_credit.rb +317 -0
  76. data/lib/merge_accounting_client/models/vendor_credit_line.rb +265 -0
  77. data/lib/merge_accounting_client/version.rb +1 -1
  78. data/lib/merge_accounting_client.rb +4 -1
  79. data/spec/api/force_resync_api_spec.rb +1 -1
  80. data/spec/api/linked_accounts_api_spec.rb +7 -7
  81. data/spec/api/vendor_credits_api_spec.rb +70 -0
  82. data/spec/api/webhook_receivers_api_spec.rb +3 -3
  83. data/spec/models/account_spec.rb +6 -0
  84. data/spec/models/accounting_attachment_spec.rb +6 -0
  85. data/spec/models/balance_sheet_spec.rb +6 -0
  86. data/spec/models/cash_flow_statement_spec.rb +6 -0
  87. data/spec/models/company_info_spec.rb +6 -0
  88. data/spec/models/contact_spec.rb +6 -0
  89. data/spec/models/credit_note_spec.rb +6 -0
  90. data/spec/models/expense_spec.rb +6 -0
  91. data/spec/models/income_statement_spec.rb +6 -0
  92. data/spec/models/invoice_line_item_request_spec.rb +6 -0
  93. data/spec/models/invoice_line_item_spec.rb +6 -0
  94. data/spec/models/invoice_spec.rb +6 -0
  95. data/spec/models/item_spec.rb +6 -0
  96. data/spec/models/journal_entry_request_spec.rb +6 -0
  97. data/spec/models/journal_entry_spec.rb +13 -1
  98. data/spec/models/journal_line_request_spec.rb +6 -0
  99. data/spec/models/journal_line_spec.rb +6 -0
  100. data/spec/models/{paginated_webhook_receiver_list_spec.rb → paginated_vendor_credit_list_spec.rb} +6 -6
  101. data/spec/models/payment_spec.rb +6 -0
  102. data/spec/models/purchase_order_spec.rb +6 -0
  103. data/spec/models/tax_rate_spec.rb +6 -0
  104. data/spec/models/tracking_category_spec.rb +6 -0
  105. data/spec/models/vendor_credit_line_spec.rb +58 -0
  106. data/spec/models/vendor_credit_spec.rb +88 -0
  107. metadata +118 -106
  108. data/docs/PaginatedWebhookReceiverList.md +0 -22
@@ -49,6 +49,9 @@ module MergeAccountingClient
49
49
  # The income statement's net income.
50
50
  attr_accessor :net_income
51
51
 
52
+ # Indicates whether or not this object has been deleted on the third-party.
53
+ attr_accessor :remote_was_deleted
54
+
52
55
  # Attribute mapping from ruby-style variable name to JSON key.
53
56
  def self.attribute_map
54
57
  {
@@ -64,7 +67,8 @@ module MergeAccountingClient
64
67
  :'operating_expenses' => :'operating_expenses',
65
68
  :'net_operating_income' => :'net_operating_income',
66
69
  :'non_operating_expenses' => :'non_operating_expenses',
67
- :'net_income' => :'net_income'
70
+ :'net_income' => :'net_income',
71
+ :'remote_was_deleted' => :'remote_was_deleted'
68
72
  }
69
73
  end
70
74
 
@@ -88,7 +92,8 @@ module MergeAccountingClient
88
92
  :'operating_expenses' => :'Array<ReportItem>',
89
93
  :'net_operating_income' => :'Float',
90
94
  :'non_operating_expenses' => :'Array<ReportItem>',
91
- :'net_income' => :'Float'
95
+ :'net_income' => :'Float',
96
+ :'remote_was_deleted' => :'Boolean'
92
97
  }
93
98
  end
94
99
 
@@ -102,7 +107,7 @@ module MergeAccountingClient
102
107
  :'end_period',
103
108
  :'gross_profit',
104
109
  :'net_operating_income',
105
- :'net_income'
110
+ :'net_income',
106
111
  ])
107
112
  end
108
113
 
@@ -182,6 +187,10 @@ module MergeAccountingClient
182
187
  if attributes.key?(:'net_income')
183
188
  self.net_income = attributes[:'net_income']
184
189
  end
190
+
191
+ if attributes.key?(:'remote_was_deleted')
192
+ self.remote_was_deleted = attributes[:'remote_was_deleted']
193
+ end
185
194
  end
186
195
 
187
196
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -214,7 +223,8 @@ module MergeAccountingClient
214
223
  operating_expenses == o.operating_expenses &&
215
224
  net_operating_income == o.net_operating_income &&
216
225
  non_operating_expenses == o.non_operating_expenses &&
217
- net_income == o.net_income
226
+ net_income == o.net_income &&
227
+ remote_was_deleted == o.remote_was_deleted
218
228
  end
219
229
 
220
230
  # @see the `==` method
@@ -226,7 +236,7 @@ module MergeAccountingClient
226
236
  # Calculates hash code according to all attributes.
227
237
  # @return [Integer] Hash code
228
238
  def hash
229
- [id, remote_id, remote_data, name, start_period, end_period, income, cost_of_sales, gross_profit, operating_expenses, net_operating_income, non_operating_expenses, net_income].hash
239
+ [id, remote_id, remote_data, name, start_period, end_period, income, cost_of_sales, gross_profit, operating_expenses, net_operating_income, non_operating_expenses, net_income, remote_was_deleted].hash
230
240
  end
231
241
 
232
242
  # Builds the object from hash
@@ -69,6 +69,8 @@ module MergeAccountingClient
69
69
 
70
70
  attr_accessor :line_items
71
71
 
72
+ attr_accessor :remote_was_deleted
73
+
72
74
  # Attribute mapping from ruby-style variable name to JSON key.
73
75
  def self.attribute_map
74
76
  {
@@ -90,7 +92,8 @@ module MergeAccountingClient
90
92
  :'balance' => :'balance',
91
93
  :'remote_updated_at' => :'remote_updated_at',
92
94
  :'payments' => :'payments',
93
- :'line_items' => :'line_items'
95
+ :'line_items' => :'line_items',
96
+ :'remote_was_deleted' => :'remote_was_deleted'
94
97
  }
95
98
  end
96
99
 
@@ -120,7 +123,8 @@ module MergeAccountingClient
120
123
  :'balance' => :'Float',
121
124
  :'remote_updated_at' => :'Time',
122
125
  :'payments' => :'Array<String>',
123
- :'line_items' => :'Array<InvoiceLineItem>'
126
+ :'line_items' => :'Array<InvoiceLineItem>',
127
+ :'remote_was_deleted' => :'Boolean'
124
128
  }
125
129
  end
126
130
 
@@ -242,6 +246,10 @@ module MergeAccountingClient
242
246
  self.line_items = value
243
247
  end
244
248
  end
249
+
250
+ if attributes.key?(:'remote_was_deleted')
251
+ self.remote_was_deleted = attributes[:'remote_was_deleted']
252
+ end
245
253
  end
246
254
 
247
255
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -280,7 +288,8 @@ module MergeAccountingClient
280
288
  balance == o.balance &&
281
289
  remote_updated_at == o.remote_updated_at &&
282
290
  payments == o.payments &&
283
- line_items == o.line_items
291
+ line_items == o.line_items &&
292
+ remote_was_deleted == o.remote_was_deleted
284
293
  end
285
294
 
286
295
  # @see the `==` method
@@ -292,7 +301,7 @@ module MergeAccountingClient
292
301
  # Calculates hash code according to all attributes.
293
302
  # @return [Integer] Hash code
294
303
  def hash
295
- [id, remote_id, remote_data, type, contact, number, issue_date, due_date, paid_on_date, memo, currency, total_discount, sub_total, total_tax_amount, total_amount, balance, remote_updated_at, payments, line_items].hash
304
+ [id, remote_id, remote_data, type, contact, number, issue_date, due_date, paid_on_date, memo, currency, total_discount, sub_total, total_tax_amount, total_amount, balance, remote_updated_at, payments, line_items, remote_was_deleted].hash
296
305
  end
297
306
 
298
307
  # Builds the object from hash
@@ -39,6 +39,8 @@ module MergeAccountingClient
39
39
 
40
40
  attr_accessor :account
41
41
 
42
+ attr_accessor :tracking_category
43
+
42
44
  # Attribute mapping from ruby-style variable name to JSON key.
43
45
  def self.attribute_map
44
46
  {
@@ -50,7 +52,8 @@ module MergeAccountingClient
50
52
  :'quantity' => :'quantity',
51
53
  :'total_amount' => :'total_amount',
52
54
  :'item' => :'item',
53
- :'account' => :'account'
55
+ :'account' => :'account',
56
+ :'tracking_category' => :'tracking_category'
54
57
  }
55
58
  end
56
59
 
@@ -70,7 +73,8 @@ module MergeAccountingClient
70
73
  :'quantity' => :'Float',
71
74
  :'total_amount' => :'Float',
72
75
  :'item' => :'String',
73
- :'account' => :'String'
76
+ :'account' => :'String',
77
+ :'tracking_category' => :'String'
74
78
  }
75
79
  end
76
80
 
@@ -84,7 +88,8 @@ module MergeAccountingClient
84
88
  :'quantity',
85
89
  :'total_amount',
86
90
  :'item',
87
- :'account'
91
+ :'account',
92
+ :'tracking_category'
88
93
  ])
89
94
  end
90
95
 
@@ -140,6 +145,10 @@ module MergeAccountingClient
140
145
  if attributes.key?(:'account')
141
146
  self.account = attributes[:'account']
142
147
  end
148
+
149
+ if attributes.key?(:'tracking_category')
150
+ self.tracking_category = attributes[:'tracking_category']
151
+ end
143
152
  end
144
153
 
145
154
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -168,7 +177,8 @@ module MergeAccountingClient
168
177
  quantity == o.quantity &&
169
178
  total_amount == o.total_amount &&
170
179
  item == o.item &&
171
- account == o.account
180
+ account == o.account &&
181
+ tracking_category == o.tracking_category
172
182
  end
173
183
 
174
184
  # @see the `==` method
@@ -180,7 +190,7 @@ module MergeAccountingClient
180
190
  # Calculates hash code according to all attributes.
181
191
  # @return [Integer] Hash code
182
192
  def hash
183
- [id, remote_id, remote_data, description, unit_price, quantity, total_amount, item, account].hash
193
+ [id, remote_id, remote_data, description, unit_price, quantity, total_amount, item, account, tracking_category].hash
184
194
  end
185
195
 
186
196
  # Builds the object from hash
@@ -35,6 +35,8 @@ module MergeAccountingClient
35
35
 
36
36
  attr_accessor :account
37
37
 
38
+ attr_accessor :tracking_category
39
+
38
40
  # Attribute mapping from ruby-style variable name to JSON key.
39
41
  def self.attribute_map
40
42
  {
@@ -44,7 +46,8 @@ module MergeAccountingClient
44
46
  :'quantity' => :'quantity',
45
47
  :'total_amount' => :'total_amount',
46
48
  :'item' => :'item',
47
- :'account' => :'account'
49
+ :'account' => :'account',
50
+ :'tracking_category' => :'tracking_category'
48
51
  }
49
52
  end
50
53
 
@@ -62,7 +65,8 @@ module MergeAccountingClient
62
65
  :'quantity' => :'Float',
63
66
  :'total_amount' => :'Float',
64
67
  :'item' => :'String',
65
- :'account' => :'String'
68
+ :'account' => :'String',
69
+ :'tracking_category' => :'String'
66
70
  }
67
71
  end
68
72
 
@@ -75,7 +79,8 @@ module MergeAccountingClient
75
79
  :'quantity',
76
80
  :'total_amount',
77
81
  :'item',
78
- :'account'
82
+ :'account',
83
+ :'tracking_category'
79
84
  ])
80
85
  end
81
86
 
@@ -121,6 +126,10 @@ module MergeAccountingClient
121
126
  if attributes.key?(:'account')
122
127
  self.account = attributes[:'account']
123
128
  end
129
+
130
+ if attributes.key?(:'tracking_category')
131
+ self.tracking_category = attributes[:'tracking_category']
132
+ end
124
133
  end
125
134
 
126
135
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -147,7 +156,8 @@ module MergeAccountingClient
147
156
  quantity == o.quantity &&
148
157
  total_amount == o.total_amount &&
149
158
  item == o.item &&
150
- account == o.account
159
+ account == o.account &&
160
+ tracking_category == o.tracking_category
151
161
  end
152
162
 
153
163
  # @see the `==` method
@@ -159,7 +169,7 @@ module MergeAccountingClient
159
169
  # Calculates hash code according to all attributes.
160
170
  # @return [Integer] Hash code
161
171
  def hash
162
- [remote_id, description, unit_price, quantity, total_amount, item, account].hash
172
+ [remote_id, description, unit_price, quantity, total_amount, item, account, tracking_category].hash
163
173
  end
164
174
 
165
175
  # Builds the object from hash
@@ -29,8 +29,6 @@ module MergeAccountingClient
29
29
  # @param [String] The enum value in the form of the string
30
30
  # @return [String] The enum value
31
31
  def build_from_hash(value)
32
- constantValues = InvoiceTypeEnum.constants.select { |c| InvoiceTypeEnum::const_get(c) == value }
33
- raise "Invalid ENUM value #{value} for class #InvoiceTypeEnum" if constantValues.empty?
34
32
  value
35
33
  end
36
34
  end
@@ -29,8 +29,6 @@ module MergeAccountingClient
29
29
  # @param [String] The enum value in the form of the string
30
30
  # @return [String] The enum value
31
31
  def build_from_hash(value)
32
- constantValues = IssueStatusEnum.constants.select { |c| IssueStatusEnum::const_get(c) == value }
33
- raise "Invalid ENUM value #{value} for class #IssueStatusEnum" if constantValues.empty?
34
32
  value
35
33
  end
36
34
  end
@@ -42,6 +42,9 @@ module MergeAccountingClient
42
42
  # When the third party's item note was updated.
43
43
  attr_accessor :remote_updated_at
44
44
 
45
+ # Indicates whether or not this object has been deleted on the third-party.
46
+ attr_accessor :remote_was_deleted
47
+
45
48
  # Attribute mapping from ruby-style variable name to JSON key.
46
49
  def self.attribute_map
47
50
  {
@@ -54,7 +57,8 @@ module MergeAccountingClient
54
57
  :'purchase_price' => :'purchase_price',
55
58
  :'purchase_account' => :'purchase_account',
56
59
  :'sales_account' => :'sales_account',
57
- :'remote_updated_at' => :'remote_updated_at'
60
+ :'remote_updated_at' => :'remote_updated_at',
61
+ :'remote_was_deleted' => :'remote_was_deleted'
58
62
  }
59
63
  end
60
64
 
@@ -75,7 +79,8 @@ module MergeAccountingClient
75
79
  :'purchase_price' => :'Float',
76
80
  :'purchase_account' => :'String',
77
81
  :'sales_account' => :'String',
78
- :'remote_updated_at' => :'Time'
82
+ :'remote_updated_at' => :'Time',
83
+ :'remote_was_deleted' => :'Boolean'
79
84
  }
80
85
  end
81
86
 
@@ -90,7 +95,7 @@ module MergeAccountingClient
90
95
  :'purchase_price',
91
96
  :'purchase_account',
92
97
  :'sales_account',
93
- :'remote_updated_at'
98
+ :'remote_updated_at',
94
99
  ])
95
100
  end
96
101
 
@@ -150,6 +155,10 @@ module MergeAccountingClient
150
155
  if attributes.key?(:'remote_updated_at')
151
156
  self.remote_updated_at = attributes[:'remote_updated_at']
152
157
  end
158
+
159
+ if attributes.key?(:'remote_was_deleted')
160
+ self.remote_was_deleted = attributes[:'remote_was_deleted']
161
+ end
153
162
  end
154
163
 
155
164
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -179,7 +188,8 @@ module MergeAccountingClient
179
188
  purchase_price == o.purchase_price &&
180
189
  purchase_account == o.purchase_account &&
181
190
  sales_account == o.sales_account &&
182
- remote_updated_at == o.remote_updated_at
191
+ remote_updated_at == o.remote_updated_at &&
192
+ remote_was_deleted == o.remote_was_deleted
183
193
  end
184
194
 
185
195
  # @see the `==` method
@@ -191,7 +201,7 @@ module MergeAccountingClient
191
201
  # Calculates hash code according to all attributes.
192
202
  # @return [Integer] Hash code
193
203
  def hash
194
- [id, remote_id, remote_data, name, status, unit_price, purchase_price, purchase_account, sales_account, remote_updated_at].hash
204
+ [id, remote_id, remote_data, name, status, unit_price, purchase_price, purchase_account, sales_account, remote_updated_at, remote_was_deleted].hash
195
205
  end
196
206
 
197
207
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The JournalEntry Object ### Description The `JournalEntry` object is used to represent a company's journey entries ### Usage Example Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
17
+ # # The JournalEntry Object ### Description The `JournalEntry` object is used to represent a company's journey entries. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
18
18
  class JournalEntry
19
19
  attr_accessor :id
20
20
 
@@ -32,11 +32,16 @@ module MergeAccountingClient
32
32
  # Array of `Payment` object IDs.
33
33
  attr_accessor :payments
34
34
 
35
- attr_accessor :lines
36
-
37
35
  # The journal entry's private note.
38
36
  attr_accessor :memo
39
37
 
38
+ # The journal's currency.
39
+ attr_accessor :currency
40
+
41
+ attr_accessor :lines
42
+
43
+ attr_accessor :remote_was_deleted
44
+
40
45
  # Attribute mapping from ruby-style variable name to JSON key.
41
46
  def self.attribute_map
42
47
  {
@@ -46,8 +51,10 @@ module MergeAccountingClient
46
51
  :'transaction_date' => :'transaction_date',
47
52
  :'remote_created_at' => :'remote_created_at',
48
53
  :'payments' => :'payments',
54
+ :'memo' => :'memo',
55
+ :'currency' => :'currency',
49
56
  :'lines' => :'lines',
50
- :'memo' => :'memo'
57
+ :'remote_was_deleted' => :'remote_was_deleted'
51
58
  }
52
59
  end
53
60
 
@@ -65,8 +72,10 @@ module MergeAccountingClient
65
72
  :'transaction_date' => :'Time',
66
73
  :'remote_created_at' => :'Time',
67
74
  :'payments' => :'Array<String>',
75
+ :'memo' => :'String',
76
+ :'currency' => :'CurrencyEnum',
68
77
  :'lines' => :'Array<JournalLine>',
69
- :'memo' => :'String'
78
+ :'remote_was_deleted' => :'Boolean'
70
79
  }
71
80
  end
72
81
 
@@ -77,7 +86,8 @@ module MergeAccountingClient
77
86
  :'remote_data',
78
87
  :'transaction_date',
79
88
  :'remote_created_at',
80
- :'memo'
89
+ :'memo',
90
+ :'currency',
81
91
  ])
82
92
  end
83
93
 
@@ -124,14 +134,22 @@ module MergeAccountingClient
124
134
  end
125
135
  end
126
136
 
137
+ if attributes.key?(:'memo')
138
+ self.memo = attributes[:'memo']
139
+ end
140
+
141
+ if attributes.key?(:'currency')
142
+ self.currency = attributes[:'currency']
143
+ end
144
+
127
145
  if attributes.key?(:'lines')
128
146
  if (value = attributes[:'lines']).is_a?(Array)
129
147
  self.lines = value
130
148
  end
131
149
  end
132
150
 
133
- if attributes.key?(:'memo')
134
- self.memo = attributes[:'memo']
151
+ if attributes.key?(:'remote_was_deleted')
152
+ self.remote_was_deleted = attributes[:'remote_was_deleted']
135
153
  end
136
154
  end
137
155
 
@@ -159,8 +177,10 @@ module MergeAccountingClient
159
177
  transaction_date == o.transaction_date &&
160
178
  remote_created_at == o.remote_created_at &&
161
179
  payments == o.payments &&
180
+ memo == o.memo &&
181
+ currency == o.currency &&
162
182
  lines == o.lines &&
163
- memo == o.memo
183
+ remote_was_deleted == o.remote_was_deleted
164
184
  end
165
185
 
166
186
  # @see the `==` method
@@ -172,7 +192,7 @@ module MergeAccountingClient
172
192
  # Calculates hash code according to all attributes.
173
193
  # @return [Integer] Hash code
174
194
  def hash
175
- [id, remote_id, remote_data, transaction_date, remote_created_at, payments, lines, memo].hash
195
+ [id, remote_id, remote_data, transaction_date, remote_created_at, payments, memo, currency, lines, remote_was_deleted].hash
176
196
  end
177
197
 
178
198
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The JournalEntry Object ### Description The `JournalEntry` object is used to represent a company's journey entries ### Usage Example Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
17
+ # # The JournalEntry Object ### Description The `JournalEntry` object is used to represent a company's journey entries. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
18
18
  class JournalEntryRequest
19
19
  # The third-party API ID of the matching object.
20
20
  attr_accessor :remote_id
@@ -31,6 +31,9 @@ module MergeAccountingClient
31
31
  # The journal entry's private note.
32
32
  attr_accessor :memo
33
33
 
34
+ # The journal's currency.
35
+ attr_accessor :currency
36
+
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
35
38
  def self.attribute_map
36
39
  {
@@ -38,7 +41,8 @@ module MergeAccountingClient
38
41
  :'transaction_date' => :'transaction_date',
39
42
  :'remote_created_at' => :'remote_created_at',
40
43
  :'payments' => :'payments',
41
- :'memo' => :'memo'
44
+ :'memo' => :'memo',
45
+ :'currency' => :'currency'
42
46
  }
43
47
  end
44
48
 
@@ -54,7 +58,8 @@ module MergeAccountingClient
54
58
  :'transaction_date' => :'Time',
55
59
  :'remote_created_at' => :'Time',
56
60
  :'payments' => :'Array<String>',
57
- :'memo' => :'String'
61
+ :'memo' => :'String',
62
+ :'currency' => :'CurrencyEnum'
58
63
  }
59
64
  end
60
65
 
@@ -64,7 +69,8 @@ module MergeAccountingClient
64
69
  :'remote_id',
65
70
  :'transaction_date',
66
71
  :'remote_created_at',
67
- :'memo'
72
+ :'memo',
73
+ :'currency'
68
74
  ])
69
75
  end
70
76
 
@@ -104,6 +110,10 @@ module MergeAccountingClient
104
110
  if attributes.key?(:'memo')
105
111
  self.memo = attributes[:'memo']
106
112
  end
113
+
114
+ if attributes.key?(:'currency')
115
+ self.currency = attributes[:'currency']
116
+ end
107
117
  end
108
118
 
109
119
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -128,7 +138,8 @@ module MergeAccountingClient
128
138
  transaction_date == o.transaction_date &&
129
139
  remote_created_at == o.remote_created_at &&
130
140
  payments == o.payments &&
131
- memo == o.memo
141
+ memo == o.memo &&
142
+ currency == o.currency
132
143
  end
133
144
 
134
145
  # @see the `==` method
@@ -140,7 +151,7 @@ module MergeAccountingClient
140
151
  # Calculates hash code according to all attributes.
141
152
  # @return [Integer] Hash code
142
153
  def hash
143
- [remote_id, transaction_date, remote_created_at, payments, memo].hash
154
+ [remote_id, transaction_date, remote_created_at, payments, memo, currency].hash
144
155
  end
145
156
 
146
157
  # Builds the object from hash
@@ -26,6 +26,8 @@ module MergeAccountingClient
26
26
 
27
27
  attr_accessor :tracking_category
28
28
 
29
+ attr_accessor :contact
30
+
29
31
  # The line's description.
30
32
  attr_accessor :description
31
33
 
@@ -36,6 +38,7 @@ module MergeAccountingClient
36
38
  :'account' => :'account',
37
39
  :'net_amount' => :'net_amount',
38
40
  :'tracking_category' => :'tracking_category',
41
+ :'contact' => :'contact',
39
42
  :'description' => :'description'
40
43
  }
41
44
  end
@@ -52,6 +55,7 @@ module MergeAccountingClient
52
55
  :'account' => :'String',
53
56
  :'net_amount' => :'Float',
54
57
  :'tracking_category' => :'String',
58
+ :'contact' => :'String',
55
59
  :'description' => :'String'
56
60
  }
57
61
  end
@@ -63,6 +67,7 @@ module MergeAccountingClient
63
67
  :'account',
64
68
  :'net_amount',
65
69
  :'tracking_category',
70
+ :'contact',
66
71
  :'description'
67
72
  ])
68
73
  end
@@ -98,6 +103,10 @@ module MergeAccountingClient
98
103
  self.tracking_category = attributes[:'tracking_category']
99
104
  end
100
105
 
106
+ if attributes.key?(:'contact')
107
+ self.contact = attributes[:'contact']
108
+ end
109
+
101
110
  if attributes.key?(:'description')
102
111
  self.description = attributes[:'description']
103
112
  end
@@ -125,6 +134,7 @@ module MergeAccountingClient
125
134
  account == o.account &&
126
135
  net_amount == o.net_amount &&
127
136
  tracking_category == o.tracking_category &&
137
+ contact == o.contact &&
128
138
  description == o.description
129
139
  end
130
140
 
@@ -137,7 +147,7 @@ module MergeAccountingClient
137
147
  # Calculates hash code according to all attributes.
138
148
  # @return [Integer] Hash code
139
149
  def hash
140
- [remote_id, account, net_amount, tracking_category, description].hash
150
+ [remote_id, account, net_amount, tracking_category, contact, description].hash
141
151
  end
142
152
 
143
153
  # Builds the object from hash
@@ -26,6 +26,8 @@ module MergeAccountingClient
26
26
 
27
27
  attr_accessor :tracking_category
28
28
 
29
+ attr_accessor :contact
30
+
29
31
  # The line's description.
30
32
  attr_accessor :description
31
33
 
@@ -36,6 +38,7 @@ module MergeAccountingClient
36
38
  :'account' => :'account',
37
39
  :'net_amount' => :'net_amount',
38
40
  :'tracking_category' => :'tracking_category',
41
+ :'contact' => :'contact',
39
42
  :'description' => :'description'
40
43
  }
41
44
  end
@@ -52,6 +55,7 @@ module MergeAccountingClient
52
55
  :'account' => :'String',
53
56
  :'net_amount' => :'Float',
54
57
  :'tracking_category' => :'String',
58
+ :'contact' => :'String',
55
59
  :'description' => :'String'
56
60
  }
57
61
  end
@@ -63,6 +67,7 @@ module MergeAccountingClient
63
67
  :'account',
64
68
  :'net_amount',
65
69
  :'tracking_category',
70
+ :'contact',
66
71
  :'description'
67
72
  ])
68
73
  end
@@ -98,6 +103,10 @@ module MergeAccountingClient
98
103
  self.tracking_category = attributes[:'tracking_category']
99
104
  end
100
105
 
106
+ if attributes.key?(:'contact')
107
+ self.contact = attributes[:'contact']
108
+ end
109
+
101
110
  if attributes.key?(:'description')
102
111
  self.description = attributes[:'description']
103
112
  end
@@ -125,6 +134,7 @@ module MergeAccountingClient
125
134
  account == o.account &&
126
135
  net_amount == o.net_amount &&
127
136
  tracking_category == o.tracking_category &&
137
+ contact == o.contact &&
128
138
  description == o.description
129
139
  end
130
140
 
@@ -137,7 +147,7 @@ module MergeAccountingClient
137
147
  # Calculates hash code according to all attributes.
138
148
  # @return [Integer] Hash code
139
149
  def hash
140
- [remote_id, account, net_amount, tracking_category, description].hash
150
+ [remote_id, account, net_amount, tracking_category, contact, description].hash
141
151
  end
142
152
 
143
153
  # Builds the object from hash
@@ -34,8 +34,6 @@ module MergeAccountingClient
34
34
  # @param [String] The enum value in the form of the string
35
35
  # @return [String] The enum value
36
36
  def build_from_hash(value)
37
- constantValues = MethodEnum.constants.select { |c| MethodEnum::const_get(c) == value }
38
- raise "Invalid ENUM value #{value} for class #MethodEnum" if constantValues.empty?
39
37
  value
40
38
  end
41
39
  end