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.
- checksums.yaml +4 -4
- data/LICENSE.md +16 -0
- data/README.md +12 -5
- data/docs/Account.md +3 -1
- data/docs/AccountDetails.md +3 -1
- data/docs/AccountDetailsAndActions.md +2 -0
- data/docs/AccountingAttachment.md +1 -1
- data/docs/AccountsApi.md +7 -3
- data/docs/AddressesApi.md +3 -1
- data/docs/AttachmentsApi.md +2 -2
- data/docs/BalanceSheet.md +3 -1
- data/docs/BalanceSheetsApi.md +2 -2
- data/docs/CashFlowStatement.md +3 -1
- data/docs/CashFlowStatementsApi.md +2 -2
- data/docs/CategoryTypeEnum.md +15 -0
- data/docs/CompanyInfo.md +1 -1
- data/docs/CompanyInfoApi.md +2 -2
- data/docs/Contact.md +1 -1
- data/docs/ContactsApi.md +7 -3
- data/docs/CreditNote.md +7 -1
- data/docs/CreditNoteLineItem.md +38 -0
- data/docs/CreditNotesApi.md +7 -3
- data/docs/DataPassthroughRequest.md +3 -1
- data/docs/EndUserDetailsRequest.md +9 -7
- data/docs/Expense.md +1 -1
- data/docs/ExpensesApi.md +2 -2
- data/docs/IncomeStatement.md +3 -1
- data/docs/IncomeStatementsApi.md +2 -2
- data/docs/InvoiceLineItem.md +0 -2
- data/docs/InvoicesApi.md +8 -4
- data/docs/Item.md +1 -1
- data/docs/ItemsApi.md +7 -3
- data/docs/JournalEntriesApi.md +2 -2
- data/docs/JournalEntry.md +2 -0
- data/docs/JournalEntryRequest.md +2 -0
- data/docs/LinkToken.md +3 -1
- data/docs/LinkedAccountsApi.md +2 -0
- data/docs/PaginatedTransactionList.md +22 -0
- data/docs/Payment.md +1 -1
- data/docs/PaymentsApi.md +2 -2
- data/docs/PurchaseOrder.md +8 -2
- data/docs/PurchaseOrderLineItem.md +9 -1
- data/docs/PurchaseOrdersApi.md +7 -3
- data/docs/RemoteResponse.md +5 -1
- data/docs/ResponseTypeEnum.md +15 -0
- data/docs/SyncStatus.md +2 -2
- data/docs/SyncStatusApi.md +1 -1
- data/docs/TaxRate.md +1 -1
- data/docs/TaxRatesApi.md +2 -2
- data/docs/TrackingCategoriesApi.md +7 -3
- data/docs/TrackingCategory.md +3 -1
- data/docs/Transaction.md +40 -0
- data/docs/TransactionLineItem.md +34 -0
- data/docs/TransactionsApi.md +181 -0
- data/docs/VendorCredit.md +1 -1
- data/docs/VendorCreditsApi.md +2 -2
- data/lib/merge_accounting_client/api/accounts_api.rb +16 -2
- data/lib/merge_accounting_client/api/addresses_api.rb +7 -0
- data/lib/merge_accounting_client/api/attachments_api.rb +2 -2
- data/lib/merge_accounting_client/api/balance_sheets_api.rb +2 -2
- data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +2 -2
- data/lib/merge_accounting_client/api/company_info_api.rb +2 -2
- data/lib/merge_accounting_client/api/contacts_api.rb +16 -2
- data/lib/merge_accounting_client/api/credit_notes_api.rb +16 -2
- data/lib/merge_accounting_client/api/expenses_api.rb +2 -2
- data/lib/merge_accounting_client/api/income_statements_api.rb +2 -2
- data/lib/merge_accounting_client/api/invoices_api.rb +17 -3
- data/lib/merge_accounting_client/api/items_api.rb +16 -2
- data/lib/merge_accounting_client/api/journal_entries_api.rb +2 -2
- data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -0
- data/lib/merge_accounting_client/api/payments_api.rb +2 -2
- data/lib/merge_accounting_client/api/purchase_orders_api.rb +16 -2
- data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
- data/lib/merge_accounting_client/api/tax_rates_api.rb +2 -2
- data/lib/merge_accounting_client/api/tracking_categories_api.rb +16 -2
- data/lib/merge_accounting_client/api/transactions_api.rb +196 -0
- data/lib/merge_accounting_client/api/vendor_credits_api.rb +2 -2
- data/lib/merge_accounting_client/api_client.rb +3 -0
- data/lib/merge_accounting_client/models/account.rb +12 -2
- data/lib/merge_accounting_client/models/account_details.rb +15 -4
- data/lib/merge_accounting_client/models/account_details_and_actions.rb +12 -1
- data/lib/merge_accounting_client/models/account_details_and_actions_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/account_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/accounting_attachment.rb +1 -1
- data/lib/merge_accounting_client/models/address_type_enum.rb +17 -7
- data/lib/merge_accounting_client/models/balance_sheet.rb +13 -2
- data/lib/merge_accounting_client/models/cash_flow_statement.rb +13 -2
- data/lib/merge_accounting_client/models/categories_enum.rb +17 -7
- data/lib/merge_accounting_client/models/category_enum.rb +17 -7
- data/lib/merge_accounting_client/models/category_type_enum.rb +45 -0
- data/lib/merge_accounting_client/models/classification_enum.rb +17 -7
- data/lib/merge_accounting_client/models/company_info.rb +1 -1
- data/lib/merge_accounting_client/models/contact.rb +1 -1
- data/lib/merge_accounting_client/models/country_enum.rb +17 -7
- data/lib/merge_accounting_client/models/credit_note.rb +35 -2
- data/lib/merge_accounting_client/models/credit_note_line_item.rb +380 -0
- data/lib/merge_accounting_client/models/credit_note_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/currency_enum.rb +17 -7
- data/lib/merge_accounting_client/models/data_passthrough_request.rb +14 -5
- data/lib/merge_accounting_client/models/encoding_enum.rb +18 -7
- data/lib/merge_accounting_client/models/end_user_details_request.rb +28 -11
- data/lib/merge_accounting_client/models/expense.rb +1 -1
- data/lib/merge_accounting_client/models/income_statement.rb +13 -2
- data/lib/merge_accounting_client/models/invoice_line_item.rb +1 -13
- data/lib/merge_accounting_client/models/invoice_type_enum.rb +17 -7
- data/lib/merge_accounting_client/models/issue_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/item.rb +1 -1
- data/lib/merge_accounting_client/models/journal_entry.rb +12 -1
- data/lib/merge_accounting_client/models/journal_entry_request.rb +12 -1
- data/lib/merge_accounting_client/models/link_token.rb +13 -4
- data/lib/merge_accounting_client/models/method_enum.rb +17 -7
- data/lib/merge_accounting_client/models/paginated_transaction_list.rb +240 -0
- data/lib/merge_accounting_client/models/payment.rb +1 -1
- data/lib/merge_accounting_client/models/purchase_order.rb +35 -2
- data/lib/merge_accounting_client/models/purchase_order_line_item.rb +83 -5
- data/lib/merge_accounting_client/models/purchase_order_status_enum.rb +17 -7
- data/lib/merge_accounting_client/models/remote_data.rb +1 -1
- data/lib/merge_accounting_client/models/remote_response.rb +27 -10
- data/lib/merge_accounting_client/models/request_format_enum.rb +17 -7
- data/lib/merge_accounting_client/models/response_type_enum.rb +45 -0
- data/lib/merge_accounting_client/models/state_enum.rb +17 -7
- data/lib/merge_accounting_client/models/status7d1_enum.rb +17 -7
- data/lib/merge_accounting_client/models/sync_status.rb +0 -10
- data/lib/merge_accounting_client/models/sync_status_status_enum.rb +18 -7
- data/lib/merge_accounting_client/models/tax_rate.rb +1 -1
- data/lib/merge_accounting_client/models/tracking_category.rb +13 -2
- data/lib/merge_accounting_client/models/transaction.rb +357 -0
- data/lib/merge_accounting_client/models/transaction_line_item.rb +359 -0
- data/lib/merge_accounting_client/models/vendor_credit.rb +1 -1
- data/lib/merge_accounting_client/version.rb +1 -1
- data/lib/merge_accounting_client.rb +7 -1
- data/merge_accounting_client.gemspec +1 -1
- data/spec/api/accounts_api_spec.rb +3 -1
- data/spec/api/addresses_api_spec.rb +1 -0
- data/spec/api/attachments_api_spec.rb +1 -1
- data/spec/api/balance_sheets_api_spec.rb +1 -1
- data/spec/api/cash_flow_statements_api_spec.rb +1 -1
- data/spec/api/company_info_api_spec.rb +1 -1
- data/spec/api/contacts_api_spec.rb +3 -1
- data/spec/api/credit_notes_api_spec.rb +3 -1
- data/spec/api/expenses_api_spec.rb +1 -1
- data/spec/api/income_statements_api_spec.rb +1 -1
- data/spec/api/invoices_api_spec.rb +3 -1
- data/spec/api/items_api_spec.rb +3 -1
- data/spec/api/journal_entries_api_spec.rb +1 -1
- data/spec/api/linked_accounts_api_spec.rb +1 -0
- data/spec/api/payments_api_spec.rb +1 -1
- data/spec/api/purchase_orders_api_spec.rb +3 -1
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/api/tax_rates_api_spec.rb +1 -1
- data/spec/api/tracking_categories_api_spec.rb +3 -1
- data/spec/api/transactions_api_spec.rb +70 -0
- data/spec/api/vendor_credits_api_spec.rb +1 -1
- data/spec/models/account_details_and_actions_spec.rb +6 -0
- data/spec/models/account_details_spec.rb +6 -0
- data/spec/models/account_spec.rb +6 -0
- data/spec/models/balance_sheet_spec.rb +6 -0
- data/spec/models/cash_flow_statement_spec.rb +6 -0
- data/spec/models/category_type_enum_spec.rb +28 -0
- data/spec/models/credit_note_line_item_spec.rb +94 -0
- data/spec/models/credit_note_spec.rb +18 -0
- data/spec/models/data_passthrough_request_spec.rb +6 -0
- data/spec/models/end_user_details_request_spec.rb +6 -0
- data/spec/models/income_statement_spec.rb +6 -0
- data/spec/models/invoice_line_item_spec.rb +0 -6
- data/spec/models/journal_entry_request_spec.rb +6 -0
- data/spec/models/journal_entry_spec.rb +6 -0
- data/spec/models/link_token_spec.rb +6 -0
- data/spec/models/paginated_transaction_list_spec.rb +46 -0
- data/spec/models/purchase_order_line_item_spec.rb +24 -0
- data/spec/models/purchase_order_spec.rb +18 -0
- data/spec/models/remote_response_spec.rb +12 -0
- data/spec/models/response_type_enum_spec.rb +28 -0
- data/spec/models/tracking_category_spec.rb +6 -0
- data/spec/models/transaction_line_item_spec.rb +82 -0
- data/spec/models/transaction_spec.rb +100 -0
- metadata +136 -107
@@ -26,6 +26,9 @@ module MergeAccountingClient
|
|
26
26
|
# The cash flow statement's name.
|
27
27
|
attr_accessor :name
|
28
28
|
|
29
|
+
# The cash flow statement's currency.
|
30
|
+
attr_accessor :currency
|
31
|
+
|
29
32
|
# The cash flow statement's start period.
|
30
33
|
attr_accessor :start_period
|
31
34
|
|
@@ -47,7 +50,7 @@ module MergeAccountingClient
|
|
47
50
|
# The time that cash flow statement was generated by the accounting system.
|
48
51
|
attr_accessor :remote_generated_at
|
49
52
|
|
50
|
-
# Indicates whether or not this object has been deleted
|
53
|
+
# Indicates whether or not this object has been deleted by third party webhooks.
|
51
54
|
attr_accessor :remote_was_deleted
|
52
55
|
|
53
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -57,6 +60,7 @@ module MergeAccountingClient
|
|
57
60
|
:'remote_id' => :'remote_id',
|
58
61
|
:'remote_data' => :'remote_data',
|
59
62
|
:'name' => :'name',
|
63
|
+
:'currency' => :'currency',
|
60
64
|
:'start_period' => :'start_period',
|
61
65
|
:'end_period' => :'end_period',
|
62
66
|
:'cash_at_beginning_of_period' => :'cash_at_beginning_of_period',
|
@@ -81,6 +85,7 @@ module MergeAccountingClient
|
|
81
85
|
:'remote_id' => :'String',
|
82
86
|
:'remote_data' => :'Array<RemoteData>',
|
83
87
|
:'name' => :'String',
|
88
|
+
:'currency' => :'CurrencyEnum',
|
84
89
|
:'start_period' => :'Time',
|
85
90
|
:'end_period' => :'Time',
|
86
91
|
:'cash_at_beginning_of_period' => :'Float',
|
@@ -99,6 +104,7 @@ module MergeAccountingClient
|
|
99
104
|
:'remote_id',
|
100
105
|
:'remote_data',
|
101
106
|
:'name',
|
107
|
+
:'currency',
|
102
108
|
:'start_period',
|
103
109
|
:'end_period',
|
104
110
|
:'cash_at_beginning_of_period',
|
@@ -140,6 +146,10 @@ module MergeAccountingClient
|
|
140
146
|
self.name = attributes[:'name']
|
141
147
|
end
|
142
148
|
|
149
|
+
if attributes.key?(:'currency')
|
150
|
+
self.currency = attributes[:'currency']
|
151
|
+
end
|
152
|
+
|
143
153
|
if attributes.key?(:'start_period')
|
144
154
|
self.start_period = attributes[:'start_period']
|
145
155
|
end
|
@@ -205,6 +215,7 @@ module MergeAccountingClient
|
|
205
215
|
remote_id == o.remote_id &&
|
206
216
|
remote_data == o.remote_data &&
|
207
217
|
name == o.name &&
|
218
|
+
currency == o.currency &&
|
208
219
|
start_period == o.start_period &&
|
209
220
|
end_period == o.end_period &&
|
210
221
|
cash_at_beginning_of_period == o.cash_at_beginning_of_period &&
|
@@ -225,7 +236,7 @@ module MergeAccountingClient
|
|
225
236
|
# Calculates hash code according to all attributes.
|
226
237
|
# @return [Integer] Hash code
|
227
238
|
def hash
|
228
|
-
[id, remote_id, remote_data, name, start_period, end_period, cash_at_beginning_of_period, cash_at_end_of_period, operating_activities, investing_activities, financing_activities, remote_generated_at, remote_was_deleted].hash
|
239
|
+
[id, remote_id, remote_data, name, currency, start_period, end_period, cash_at_beginning_of_period, cash_at_end_of_period, operating_activities, investing_activities, financing_activities, remote_generated_at, remote_was_deleted].hash
|
229
240
|
end
|
230
241
|
|
231
242
|
# Builds the object from hash
|
@@ -21,18 +21,28 @@ module MergeAccountingClient
|
|
21
21
|
TICKETING = "ticketing".freeze
|
22
22
|
CRM = "crm".freeze
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
@@ -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 CategoryTypeEnum
|
18
|
+
CLASS = "CLASS".freeze
|
19
|
+
DEPARTMENT = "DEPARTMENT".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 ["CLASS", "DEPARTMENT", ].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
|
@@ -21,18 +21,28 @@ module MergeAccountingClient
|
|
21
21
|
LIABILITY = "LIABILITY".freeze
|
22
22
|
REVENUE = "REVENUE".freeze
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
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
|
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
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
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
|
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
|