merge_accounting_client 1.0.8 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +238 -224
- data/docs/Account.md +5 -1
- data/docs/AccountIntegration.md +8 -2
- data/docs/AccountingAttachment.md +5 -1
- data/docs/AccountingPeriod.md +30 -0
- data/docs/AccountingPeriodStatusEnum.md +15 -0
- data/docs/AccountingPeriodsApi.md +167 -0
- data/docs/AccountingPhoneNumber.md +5 -1
- data/docs/AccountsApi.md +4 -4
- data/docs/Address.md +6 -2
- data/docs/AddressRequest.md +34 -0
- data/docs/AsyncPassthroughApi.md +155 -0
- data/docs/AsyncPassthroughReciept.md +18 -0
- data/docs/AttachmentsApi.md +4 -4
- data/docs/AuditLogEvent.md +32 -0
- data/docs/AuditTrailApi.md +91 -0
- data/docs/BalanceSheet.md +5 -1
- data/docs/BalanceSheetsApi.md +4 -4
- data/docs/CashFlowStatement.md +5 -1
- data/docs/CashFlowStatementsApi.md +4 -4
- data/docs/CompanyInfo.md +6 -2
- data/docs/CompanyInfoApi.md +4 -4
- data/docs/Contact.md +6 -2
- data/docs/ContactRequest.md +1 -1
- data/docs/ContactsApi.md +8 -4
- data/docs/CreditNote.md +14 -2
- data/docs/CreditNoteLineItem.md +9 -1
- data/docs/CreditNotesApi.md +6 -6
- data/docs/DeleteAccountApi.md +9 -9
- data/docs/EndUserDetailsRequest.md +2 -2
- data/docs/EventTypeEnum.md +15 -0
- data/docs/Expense.md +14 -2
- data/docs/ExpenseLine.md +11 -1
- data/docs/ExpenseLineRequest.md +2 -0
- data/docs/ExpenseRequest.md +9 -1
- data/docs/ExpensesApi.md +4 -4
- data/docs/ForceResyncApi.md +1 -1
- data/docs/IncomeStatement.md +5 -1
- data/docs/IncomeStatementsApi.md +4 -4
- data/docs/Invoice.md +18 -4
- data/docs/InvoiceLineItem.md +7 -1
- data/docs/InvoiceRequest.md +7 -1
- data/docs/InvoiceStatusEnum.md +15 -0
- data/docs/InvoicesApi.md +6 -6
- data/docs/Issue.md +2 -2
- data/docs/IssuesApi.md +6 -6
- data/docs/Item.md +5 -1
- data/docs/ItemsApi.md +4 -4
- data/docs/JournalEntriesApi.md +6 -6
- data/docs/JournalEntry.md +13 -1
- data/docs/JournalEntryRequest.md +4 -0
- data/docs/JournalLine.md +13 -1
- data/docs/JournalLineRequest.md +4 -0
- data/docs/LinkedAccountsApi.md +2 -2
- data/docs/MetaResponse.md +2 -2
- data/docs/PaginatedAccountingPeriodList.md +22 -0
- data/docs/PaginatedAuditLogEventList.md +22 -0
- data/docs/Payment.md +11 -1
- data/docs/PaymentLineItem.md +32 -0
- data/docs/PaymentLineItemRequest.md +30 -0
- data/docs/PaymentRequest.md +6 -0
- data/docs/PaymentsApi.md +4 -4
- data/docs/PurchaseOrder.md +13 -3
- data/docs/PurchaseOrderLineItem.md +9 -1
- data/docs/PurchaseOrderRequest.md +2 -0
- data/docs/PurchaseOrdersApi.md +6 -6
- data/docs/RemoteData.md +1 -1
- data/docs/ReportItem.md +5 -1
- data/docs/RoleEnum.md +15 -0
- data/docs/SyncStatus.md +1 -1
- data/docs/SyncStatusApi.md +15 -11
- data/docs/TaxRate.md +5 -1
- data/docs/TaxRatesApi.md +4 -4
- data/docs/TrackingCategoriesApi.md +4 -4
- data/docs/TrackingCategory.md +5 -1
- data/docs/Transaction.md +9 -3
- data/docs/TransactionLineItem.md +9 -1
- data/docs/TransactionsApi.md +4 -4
- data/docs/VendorCredit.md +10 -2
- data/docs/VendorCreditLine.md +9 -1
- data/docs/VendorCreditsApi.md +6 -6
- data/git_push.sh +58 -0
- data/lib/merge_accounting_client/api/accounting_periods_api.rb +167 -0
- data/lib/merge_accounting_client/api/accounts_api.rb +4 -4
- data/lib/merge_accounting_client/api/async_passthrough_api.rb +160 -0
- data/lib/merge_accounting_client/api/attachments_api.rb +4 -4
- data/lib/merge_accounting_client/api/audit_trail_api.rb +95 -0
- data/lib/merge_accounting_client/api/balance_sheets_api.rb +4 -4
- data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +4 -4
- data/lib/merge_accounting_client/api/company_info_api.rb +4 -4
- data/lib/merge_accounting_client/api/contacts_api.rb +10 -4
- data/lib/merge_accounting_client/api/credit_notes_api.rb +6 -6
- data/lib/merge_accounting_client/api/delete_account_api.rb +7 -7
- data/lib/merge_accounting_client/api/expenses_api.rb +6 -6
- data/lib/merge_accounting_client/api/force_resync_api.rb +2 -2
- data/lib/merge_accounting_client/api/income_statements_api.rb +4 -4
- data/lib/merge_accounting_client/api/invoices_api.rb +6 -6
- data/lib/merge_accounting_client/api/issues_api.rb +6 -6
- data/lib/merge_accounting_client/api/items_api.rb +4 -4
- data/lib/merge_accounting_client/api/journal_entries_api.rb +6 -6
- data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -3
- data/lib/merge_accounting_client/api/payments_api.rb +6 -6
- data/lib/merge_accounting_client/api/purchase_orders_api.rb +6 -6
- data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
- data/lib/merge_accounting_client/api/tax_rates_api.rb +4 -4
- data/lib/merge_accounting_client/api/tracking_categories_api.rb +4 -4
- data/lib/merge_accounting_client/api/transactions_api.rb +6 -6
- data/lib/merge_accounting_client/api/vendor_credits_api.rb +6 -6
- data/lib/merge_accounting_client/configuration.rb +4 -0
- data/lib/merge_accounting_client/models/account.rb +22 -3
- data/lib/merge_accounting_client/models/account_integration.rb +37 -4
- data/lib/merge_accounting_client/models/account_request.rb +1 -1
- data/lib/merge_accounting_client/models/accounting_attachment.rb +21 -2
- data/lib/merge_accounting_client/models/accounting_period.rb +296 -0
- data/lib/merge_accounting_client/models/accounting_period_status_enum.rb +45 -0
- data/lib/merge_accounting_client/models/accounting_phone_number.rb +24 -5
- data/lib/merge_accounting_client/models/address.rb +24 -5
- data/lib/merge_accounting_client/models/address_request.rb +311 -0
- data/lib/merge_accounting_client/models/async_passthrough_reciept.rb +223 -0
- data/lib/merge_accounting_client/models/audit_log_event.rb +356 -0
- data/lib/merge_accounting_client/models/balance_sheet.rb +21 -2
- data/lib/merge_accounting_client/models/cash_flow_statement.rb +21 -2
- data/lib/merge_accounting_client/models/company_info.rb +22 -3
- data/lib/merge_accounting_client/models/contact.rb +23 -4
- data/lib/merge_accounting_client/models/contact_request.rb +2 -2
- data/lib/merge_accounting_client/models/credit_note.rb +84 -3
- data/lib/merge_accounting_client/models/credit_note_line_item.rb +43 -5
- data/lib/merge_accounting_client/models/end_user_details_request.rb +2 -2
- data/lib/merge_accounting_client/models/event_type_enum.rb +67 -0
- data/lib/merge_accounting_client/models/expense.rb +66 -3
- data/lib/merge_accounting_client/models/expense_line.rb +54 -5
- data/lib/merge_accounting_client/models/expense_line_request.rb +12 -1
- data/lib/merge_accounting_client/models/expense_request.rb +46 -2
- data/lib/merge_accounting_client/models/income_statement.rb +21 -2
- data/lib/merge_accounting_client/models/invoice.rb +84 -9
- data/lib/merge_accounting_client/models/invoice_line_item.rb +31 -2
- data/lib/merge_accounting_client/models/invoice_line_item_request.rb +1 -1
- data/lib/merge_accounting_client/models/invoice_request.rb +35 -2
- data/lib/merge_accounting_client/models/invoice_status_enum.rb +49 -0
- data/lib/merge_accounting_client/models/issue.rb +1 -0
- data/lib/merge_accounting_client/models/item.rb +21 -2
- data/lib/merge_accounting_client/models/journal_entry.rb +81 -2
- data/lib/merge_accounting_client/models/journal_entry_request.rb +38 -1
- data/lib/merge_accounting_client/models/journal_line.rb +65 -5
- data/lib/merge_accounting_client/models/journal_line_request.rb +23 -1
- data/lib/merge_accounting_client/models/paginated_accounting_period_list.rb +240 -0
- data/lib/merge_accounting_client/models/paginated_audit_log_event_list.rb +240 -0
- data/lib/merge_accounting_client/models/payment.rb +55 -2
- data/lib/merge_accounting_client/models/payment_line_item.rb +308 -0
- data/lib/merge_accounting_client/models/payment_line_item_request.rb +319 -0
- data/lib/merge_accounting_client/models/payment_request.rb +35 -1
- data/lib/merge_accounting_client/models/purchase_order.rb +70 -3
- data/lib/merge_accounting_client/models/purchase_order_line_item.rb +43 -5
- data/lib/merge_accounting_client/models/purchase_order_request.rb +12 -1
- data/lib/merge_accounting_client/models/remote_data.rb +3 -4
- data/lib/merge_accounting_client/models/report_item.rb +24 -5
- data/lib/merge_accounting_client/models/role_enum.rb +49 -0
- data/lib/merge_accounting_client/models/sync_status_status_enum.rb +1 -1
- data/lib/merge_accounting_client/models/tax_rate.rb +21 -2
- data/lib/merge_accounting_client/models/tracking_category.rb +22 -3
- data/lib/merge_accounting_client/models/transaction.rb +33 -3
- data/lib/merge_accounting_client/models/transaction_line_item.rb +43 -5
- data/lib/merge_accounting_client/models/vendor_credit.rb +44 -3
- data/lib/merge_accounting_client/models/vendor_credit_line.rb +43 -5
- data/lib/merge_accounting_client/version.rb +1 -1
- data/lib/merge_accounting_client.rb +15 -7
- data/spec/api/accounting_periods_api_spec.rb +63 -0
- data/spec/api/accounts_api_spec.rb +2 -2
- data/spec/api/async_passthrough_api_spec.rb +59 -0
- data/spec/api/attachments_api_spec.rb +2 -2
- data/spec/api/audit_trail_api_spec.rb +51 -0
- data/spec/api/balance_sheets_api_spec.rb +2 -2
- data/spec/api/cash_flow_statements_api_spec.rb +2 -2
- data/spec/api/company_info_api_spec.rb +2 -2
- data/spec/api/contacts_api_spec.rb +4 -2
- data/spec/api/credit_notes_api_spec.rb +2 -2
- data/spec/api/delete_account_api_spec.rb +2 -2
- data/spec/api/expenses_api_spec.rb +2 -2
- data/spec/api/force_resync_api_spec.rb +1 -1
- data/spec/api/income_statements_api_spec.rb +2 -2
- data/spec/api/invoices_api_spec.rb +2 -2
- data/spec/api/issues_api_spec.rb +3 -3
- data/spec/api/items_api_spec.rb +2 -2
- data/spec/api/journal_entries_api_spec.rb +2 -2
- data/spec/api/linked_accounts_api_spec.rb +1 -1
- data/spec/api/payments_api_spec.rb +2 -2
- data/spec/api/purchase_orders_api_spec.rb +2 -2
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/api/tax_rates_api_spec.rb +2 -2
- data/spec/api/tracking_categories_api_spec.rb +2 -2
- data/spec/api/transactions_api_spec.rb +2 -2
- data/spec/api/vendor_credits_api_spec.rb +2 -2
- data/spec/models/account_integration_spec.rb +18 -0
- data/spec/models/account_spec.rb +12 -0
- data/spec/models/accounting_attachment_spec.rb +12 -0
- data/spec/models/accounting_period_spec.rb +70 -0
- data/spec/models/accounting_period_status_enum_spec.rb +28 -0
- data/spec/models/accounting_phone_number_spec.rb +12 -0
- data/spec/models/address_request_spec.rb +82 -0
- data/spec/models/address_spec.rb +12 -0
- data/spec/models/async_passthrough_reciept_spec.rb +34 -0
- data/spec/models/audit_log_event_spec.rb +76 -0
- data/spec/models/balance_sheet_spec.rb +12 -0
- data/spec/models/cash_flow_statement_spec.rb +12 -0
- data/spec/models/company_info_spec.rb +12 -0
- data/spec/models/contact_spec.rb +12 -0
- data/spec/models/credit_note_line_item_spec.rb +24 -0
- data/spec/models/credit_note_spec.rb +36 -0
- data/spec/models/event_type_enum_spec.rb +28 -0
- data/spec/models/expense_line_request_spec.rb +6 -0
- data/spec/models/expense_line_spec.rb +30 -0
- data/spec/models/expense_request_spec.rb +24 -0
- data/spec/models/expense_spec.rb +36 -0
- data/spec/models/income_statement_spec.rb +12 -0
- data/spec/models/invoice_line_item_spec.rb +18 -0
- data/spec/models/invoice_request_spec.rb +18 -0
- data/spec/models/invoice_spec.rb +43 -1
- data/spec/models/invoice_status_enum_spec.rb +28 -0
- data/spec/models/item_spec.rb +12 -0
- data/spec/models/journal_entry_request_spec.rb +12 -0
- data/spec/models/journal_entry_spec.rb +36 -0
- data/spec/models/journal_line_request_spec.rb +12 -0
- data/spec/models/journal_line_spec.rb +36 -0
- data/spec/models/paginated_accounting_period_list_spec.rb +46 -0
- data/spec/models/paginated_audit_log_event_list_spec.rb +46 -0
- data/spec/models/payment_line_item_request_spec.rb +70 -0
- data/spec/models/payment_line_item_spec.rb +76 -0
- data/spec/models/payment_request_spec.rb +18 -0
- data/spec/models/payment_spec.rb +30 -0
- data/spec/models/purchase_order_line_item_spec.rb +24 -0
- data/spec/models/purchase_order_request_spec.rb +6 -0
- data/spec/models/purchase_order_spec.rb +30 -0
- data/spec/models/report_item_spec.rb +12 -0
- data/spec/models/role_enum_spec.rb +28 -0
- data/spec/models/tax_rate_spec.rb +12 -0
- data/spec/models/tracking_category_spec.rb +12 -0
- data/spec/models/transaction_line_item_spec.rb +24 -0
- data/spec/models/transaction_spec.rb +18 -0
- data/spec/models/vendor_credit_line_spec.rb +24 -0
- data/spec/models/vendor_credit_spec.rb +24 -0
- metadata +211 -150
@@ -0,0 +1,311 @@
|
|
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
|
+
# # The Address Object ### Description The `Address` object is used to represent a contact's or company's address. ### Usage Example Fetch from the `GET CompanyInfo` endpoint and view the company's addresses.
|
18
|
+
class AddressRequest
|
19
|
+
# The address type. * `BILLING` - BILLING * `SHIPPING` - SHIPPING
|
20
|
+
attr_accessor :type
|
21
|
+
|
22
|
+
# Line 1 of the address's street.
|
23
|
+
attr_accessor :street_1
|
24
|
+
|
25
|
+
# Line 2 of the address's street.
|
26
|
+
attr_accessor :street_2
|
27
|
+
|
28
|
+
# The address's city.
|
29
|
+
attr_accessor :city
|
30
|
+
|
31
|
+
# The address's state or region.
|
32
|
+
attr_accessor :country_subdivision
|
33
|
+
|
34
|
+
# The address's country. * `AF` - Afghanistan * `AX` - Åland Islands * `AL` - Albania * `DZ` - Algeria * `AS` - American Samoa * `AD` - Andorra * `AO` - Angola * `AI` - Anguilla * `AQ` - Antarctica * `AG` - Antigua and Barbuda * `AR` - Argentina * `AM` - Armenia * `AW` - Aruba * `AU` - Australia * `AT` - Austria * `AZ` - Azerbaijan * `BS` - Bahamas * `BH` - Bahrain * `BD` - Bangladesh * `BB` - Barbados * `BY` - Belarus * `BE` - Belgium * `BZ` - Belize * `BJ` - Benin * `BM` - Bermuda * `BT` - Bhutan * `BO` - Bolivia * `BQ` - Bonaire, Sint Eustatius and Saba * `BA` - Bosnia and Herzegovina * `BW` - Botswana * `BV` - Bouvet Island * `BR` - Brazil * `IO` - British Indian Ocean Territory * `BN` - Brunei * `BG` - Bulgaria * `BF` - Burkina Faso * `BI` - Burundi * `CV` - Cabo Verde * `KH` - Cambodia * `CM` - Cameroon * `CA` - Canada * `KY` - Cayman Islands * `CF` - Central African Republic * `TD` - Chad * `CL` - Chile * `CN` - China * `CX` - Christmas Island * `CC` - Cocos (Keeling) Islands * `CO` - Colombia * `KM` - Comoros * `CG` - Congo * `CD` - Congo (the Democratic Republic of the) * `CK` - Cook Islands * `CR` - Costa Rica * `CI` - Côte d'Ivoire * `HR` - Croatia * `CU` - Cuba * `CW` - Curaçao * `CY` - Cyprus * `CZ` - Czechia * `DK` - Denmark * `DJ` - Djibouti * `DM` - Dominica * `DO` - Dominican Republic * `EC` - Ecuador * `EG` - Egypt * `SV` - El Salvador * `GQ` - Equatorial Guinea * `ER` - Eritrea * `EE` - Estonia * `SZ` - Eswatini * `ET` - Ethiopia * `FK` - Falkland Islands (Malvinas) * `FO` - Faroe Islands * `FJ` - Fiji * `FI` - Finland * `FR` - France * `GF` - French Guiana * `PF` - French Polynesia * `TF` - French Southern Territories * `GA` - Gabon * `GM` - Gambia * `GE` - Georgia * `DE` - Germany * `GH` - Ghana * `GI` - Gibraltar * `GR` - Greece * `GL` - Greenland * `GD` - Grenada * `GP` - Guadeloupe * `GU` - Guam * `GT` - Guatemala * `GG` - Guernsey * `GN` - Guinea * `GW` - Guinea-Bissau * `GY` - Guyana * `HT` - Haiti * `HM` - Heard Island and McDonald Islands * `VA` - Holy See * `HN` - Honduras * `HK` - Hong Kong * `HU` - Hungary * `IS` - Iceland * `IN` - India * `ID` - Indonesia * `IR` - Iran * `IQ` - Iraq * `IE` - Ireland * `IM` - Isle of Man * `IL` - Israel * `IT` - Italy * `JM` - Jamaica * `JP` - Japan * `JE` - Jersey * `JO` - Jordan * `KZ` - Kazakhstan * `KE` - Kenya * `KI` - Kiribati * `KW` - Kuwait * `KG` - Kyrgyzstan * `LA` - Laos * `LV` - Latvia * `LB` - Lebanon * `LS` - Lesotho * `LR` - Liberia * `LY` - Libya * `LI` - Liechtenstein * `LT` - Lithuania * `LU` - Luxembourg * `MO` - Macao * `MG` - Madagascar * `MW` - Malawi * `MY` - Malaysia * `MV` - Maldives * `ML` - Mali * `MT` - Malta * `MH` - Marshall Islands * `MQ` - Martinique * `MR` - Mauritania * `MU` - Mauritius * `YT` - Mayotte * `MX` - Mexico * `FM` - Micronesia (Federated States of) * `MD` - Moldova * `MC` - Monaco * `MN` - Mongolia * `ME` - Montenegro * `MS` - Montserrat * `MA` - Morocco * `MZ` - Mozambique * `MM` - Myanmar * `NA` - Namibia * `NR` - Nauru * `NP` - Nepal * `NL` - Netherlands * `NC` - New Caledonia * `NZ` - New Zealand * `NI` - Nicaragua * `NE` - Niger * `NG` - Nigeria * `NU` - Niue * `NF` - Norfolk Island * `KP` - North Korea * `MK` - North Macedonia * `MP` - Northern Mariana Islands * `NO` - Norway * `OM` - Oman * `PK` - Pakistan * `PW` - Palau * `PS` - Palestine, State of * `PA` - Panama * `PG` - Papua New Guinea * `PY` - Paraguay * `PE` - Peru * `PH` - Philippines * `PN` - Pitcairn * `PL` - Poland * `PT` - Portugal * `PR` - Puerto Rico * `QA` - Qatar * `RE` - Réunion * `RO` - Romania * `RU` - Russia * `RW` - Rwanda * `BL` - Saint Barthélemy * `SH` - Saint Helena, Ascension and Tristan da Cunha * `KN` - Saint Kitts and Nevis * `LC` - Saint Lucia * `MF` - Saint Martin (French part) * `PM` - Saint Pierre and Miquelon * `VC` - Saint Vincent and the Grenadines * `WS` - Samoa * `SM` - San Marino * `ST` - Sao Tome and Principe * `SA` - Saudi Arabia * `SN` - Senegal * `RS` - Serbia * `SC` - Seychelles * `SL` - Sierra Leone * `SG` - Singapore * `SX` - Sint Maarten (Dutch part) * `SK` - Slovakia * `SI` - Slovenia * `SB` - Solomon Islands * `SO` - Somalia * `ZA` - South Africa * `GS` - South Georgia and the South Sandwich Islands * `KR` - South Korea * `SS` - South Sudan * `ES` - Spain * `LK` - Sri Lanka * `SD` - Sudan * `SR` - Suriname * `SJ` - Svalbard and Jan Mayen * `SE` - Sweden * `CH` - Switzerland * `SY` - Syria * `TW` - Taiwan * `TJ` - Tajikistan * `TZ` - Tanzania * `TH` - Thailand * `TL` - Timor-Leste * `TG` - Togo * `TK` - Tokelau * `TO` - Tonga * `TT` - Trinidad and Tobago * `TN` - Tunisia * `TR` - Turkey * `TM` - Turkmenistan * `TC` - Turks and Caicos Islands * `TV` - Tuvalu * `UG` - Uganda * `UA` - Ukraine * `AE` - United Arab Emirates * `GB` - United Kingdom * `UM` - United States Minor Outlying Islands * `US` - United States of America * `UY` - Uruguay * `UZ` - Uzbekistan * `VU` - Vanuatu * `VE` - Venezuela * `VN` - Vietnam * `VG` - Virgin Islands (British) * `VI` - Virgin Islands (U.S.) * `WF` - Wallis and Futuna * `EH` - Western Sahara * `YE` - Yemen * `ZM` - Zambia * `ZW` - Zimbabwe
|
35
|
+
attr_accessor :country
|
36
|
+
|
37
|
+
# The address's zip code.
|
38
|
+
attr_accessor :zip_code
|
39
|
+
|
40
|
+
attr_accessor :integration_params
|
41
|
+
|
42
|
+
attr_accessor :linked_account_params
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'type' => :'type',
|
48
|
+
:'street_1' => :'street_1',
|
49
|
+
:'street_2' => :'street_2',
|
50
|
+
:'city' => :'city',
|
51
|
+
:'country_subdivision' => :'country_subdivision',
|
52
|
+
:'country' => :'country',
|
53
|
+
:'zip_code' => :'zip_code',
|
54
|
+
:'integration_params' => :'integration_params',
|
55
|
+
:'linked_account_params' => :'linked_account_params'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Returns all the JSON keys this model knows about
|
60
|
+
def self.acceptable_attributes
|
61
|
+
attribute_map.values
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.openapi_types
|
66
|
+
{
|
67
|
+
:'type' => :'AddressTypeEnum',
|
68
|
+
:'street_1' => :'String',
|
69
|
+
:'street_2' => :'String',
|
70
|
+
:'city' => :'String',
|
71
|
+
:'country_subdivision' => :'String',
|
72
|
+
:'country' => :'CountryEnum',
|
73
|
+
:'zip_code' => :'String',
|
74
|
+
:'integration_params' => :'Hash<String, Object>',
|
75
|
+
:'linked_account_params' => :'Hash<String, Object>'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# List of attributes with nullable: true
|
80
|
+
def self.openapi_nullable
|
81
|
+
Set.new([
|
82
|
+
:'type',
|
83
|
+
:'street_1',
|
84
|
+
:'street_2',
|
85
|
+
:'city',
|
86
|
+
:'country_subdivision',
|
87
|
+
:'country',
|
88
|
+
:'zip_code',
|
89
|
+
:'integration_params',
|
90
|
+
:'linked_account_params'
|
91
|
+
])
|
92
|
+
end
|
93
|
+
|
94
|
+
# Initializes the object
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
def initialize(attributes = {})
|
97
|
+
if (!attributes.is_a?(Hash))
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeAccountingClient::AddressRequest` initialize method"
|
99
|
+
end
|
100
|
+
|
101
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
103
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeAccountingClient::AddressRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
105
|
+
end
|
106
|
+
h[k.to_sym] = v
|
107
|
+
}
|
108
|
+
|
109
|
+
if attributes.key?(:'type')
|
110
|
+
self.type = attributes[:'type']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'street_1')
|
114
|
+
self.street_1 = attributes[:'street_1']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'street_2')
|
118
|
+
self.street_2 = attributes[:'street_2']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'city')
|
122
|
+
self.city = attributes[:'city']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'country_subdivision')
|
126
|
+
self.country_subdivision = attributes[:'country_subdivision']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'country')
|
130
|
+
self.country = attributes[:'country']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'zip_code')
|
134
|
+
self.zip_code = attributes[:'zip_code']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'integration_params')
|
138
|
+
if (value = attributes[:'integration_params']).is_a?(Hash)
|
139
|
+
self.integration_params = value
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'linked_account_params')
|
144
|
+
if (value = attributes[:'linked_account_params']).is_a?(Hash)
|
145
|
+
self.linked_account_params = value
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
151
|
+
# @return Array for valid properties with the reasons
|
152
|
+
def list_invalid_properties
|
153
|
+
invalid_properties = Array.new
|
154
|
+
invalid_properties
|
155
|
+
end
|
156
|
+
|
157
|
+
# Check to see if the all the properties in the model are valid
|
158
|
+
# @return true if the model is valid
|
159
|
+
def valid?
|
160
|
+
true
|
161
|
+
end
|
162
|
+
|
163
|
+
# Checks equality by comparing each attribute.
|
164
|
+
# @param [Object] Object to be compared
|
165
|
+
def ==(o)
|
166
|
+
return true if self.equal?(o)
|
167
|
+
self.class == o.class &&
|
168
|
+
type == o.type &&
|
169
|
+
street_1 == o.street_1 &&
|
170
|
+
street_2 == o.street_2 &&
|
171
|
+
city == o.city &&
|
172
|
+
country_subdivision == o.country_subdivision &&
|
173
|
+
country == o.country &&
|
174
|
+
zip_code == o.zip_code &&
|
175
|
+
integration_params == o.integration_params &&
|
176
|
+
linked_account_params == o.linked_account_params
|
177
|
+
end
|
178
|
+
|
179
|
+
# @see the `==` method
|
180
|
+
# @param [Object] Object to be compared
|
181
|
+
def eql?(o)
|
182
|
+
self == o
|
183
|
+
end
|
184
|
+
|
185
|
+
# Calculates hash code according to all attributes.
|
186
|
+
# @return [Integer] Hash code
|
187
|
+
def hash
|
188
|
+
[type, street_1, street_2, city, country_subdivision, country, zip_code, integration_params, linked_account_params].hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Builds the object from hash
|
192
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
193
|
+
# @return [Object] Returns the model itself
|
194
|
+
def self.build_from_hash(attributes)
|
195
|
+
new.build_from_hash(attributes)
|
196
|
+
end
|
197
|
+
|
198
|
+
# Builds the object from hash
|
199
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
200
|
+
# @return [Object] Returns the model itself
|
201
|
+
def build_from_hash(attributes)
|
202
|
+
return nil unless attributes.is_a?(Hash)
|
203
|
+
self.class.openapi_types.each_pair do |key, type|
|
204
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
205
|
+
self.send("#{key}=", nil)
|
206
|
+
elsif type =~ /\AArray<(.*)>/i
|
207
|
+
# check to ensure the input is an array given that the attribute
|
208
|
+
# is documented as an array but the input is not
|
209
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
210
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
211
|
+
end
|
212
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
213
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
self
|
218
|
+
end
|
219
|
+
|
220
|
+
# Deserializes the data based on type
|
221
|
+
# @param string type Data type
|
222
|
+
# @param string value Value to be deserialized
|
223
|
+
# @return [Object] Deserialized data
|
224
|
+
def _deserialize(type, value)
|
225
|
+
case type.to_sym
|
226
|
+
when :Time
|
227
|
+
Time.parse(value)
|
228
|
+
when :Date
|
229
|
+
Date.parse(value)
|
230
|
+
when :String
|
231
|
+
value
|
232
|
+
when :Integer
|
233
|
+
value.to_i
|
234
|
+
when :Float
|
235
|
+
value.to_f
|
236
|
+
when :Boolean
|
237
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
238
|
+
true
|
239
|
+
else
|
240
|
+
false
|
241
|
+
end
|
242
|
+
when :Object
|
243
|
+
# generic object (usually a Hash), return directly
|
244
|
+
value
|
245
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
246
|
+
inner_type = Regexp.last_match[:inner_type]
|
247
|
+
value.map { |v| _deserialize(inner_type, v) }
|
248
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
249
|
+
k_type = Regexp.last_match[:k_type]
|
250
|
+
v_type = Regexp.last_match[:v_type]
|
251
|
+
{}.tap do |hash|
|
252
|
+
value.each do |k, v|
|
253
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
254
|
+
end
|
255
|
+
end
|
256
|
+
else # model
|
257
|
+
# models (e.g. Pet) or oneOf
|
258
|
+
klass = MergeAccountingClient.const_get(type)
|
259
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
# Returns the string representation of the object
|
264
|
+
# @return [String] String presentation of the object
|
265
|
+
def to_s
|
266
|
+
to_hash.to_s
|
267
|
+
end
|
268
|
+
|
269
|
+
# to_body is an alias to to_hash (backward compatibility)
|
270
|
+
# @return [Hash] Returns the object in the form of hash
|
271
|
+
def to_body
|
272
|
+
to_hash
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the object in the form of hash
|
276
|
+
# @return [Hash] Returns the object in the form of hash
|
277
|
+
def to_hash
|
278
|
+
hash = {}
|
279
|
+
self.class.attribute_map.each_pair do |attr, param|
|
280
|
+
value = self.send(attr)
|
281
|
+
if value.nil?
|
282
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
283
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
284
|
+
end
|
285
|
+
|
286
|
+
hash[param] = _to_hash(value)
|
287
|
+
end
|
288
|
+
hash
|
289
|
+
end
|
290
|
+
|
291
|
+
# Outputs non-array value in the form of hash
|
292
|
+
# For object, use to_hash. Otherwise, just return the value
|
293
|
+
# @param [Object] value Any valid value
|
294
|
+
# @return [Hash] Returns the value in the form of hash
|
295
|
+
def _to_hash(value)
|
296
|
+
if value.is_a?(Array)
|
297
|
+
value.compact.map { |v| _to_hash(v) }
|
298
|
+
elsif value.is_a?(Hash)
|
299
|
+
{}.tap do |hash|
|
300
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
301
|
+
end
|
302
|
+
elsif value.respond_to? :to_hash
|
303
|
+
value.to_hash
|
304
|
+
else
|
305
|
+
value
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
end
|
310
|
+
|
311
|
+
end
|
@@ -0,0 +1,223 @@
|
|
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 AsyncPassthroughReciept
|
18
|
+
attr_accessor :async_passthrough_receipt_id
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'async_passthrough_receipt_id' => :'async_passthrough_receipt_id'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'async_passthrough_receipt_id' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeAccountingClient::AsyncPassthroughReciept` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeAccountingClient::AsyncPassthroughReciept`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'async_passthrough_receipt_id')
|
61
|
+
self.async_passthrough_receipt_id = attributes[:'async_passthrough_receipt_id']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
if @async_passthrough_receipt_id.nil?
|
70
|
+
invalid_properties.push('invalid value for "async_passthrough_receipt_id", async_passthrough_receipt_id cannot be nil.')
|
71
|
+
end
|
72
|
+
|
73
|
+
invalid_properties
|
74
|
+
end
|
75
|
+
|
76
|
+
# Check to see if the all the properties in the model are valid
|
77
|
+
# @return true if the model is valid
|
78
|
+
def valid?
|
79
|
+
return false if @async_passthrough_receipt_id.nil?
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Checks equality by comparing each attribute.
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
async_passthrough_receipt_id == o.async_passthrough_receipt_id
|
89
|
+
end
|
90
|
+
|
91
|
+
# @see the `==` method
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def eql?(o)
|
94
|
+
self == o
|
95
|
+
end
|
96
|
+
|
97
|
+
# Calculates hash code according to all attributes.
|
98
|
+
# @return [Integer] Hash code
|
99
|
+
def hash
|
100
|
+
[async_passthrough_receipt_id].hash
|
101
|
+
end
|
102
|
+
|
103
|
+
# Builds the object from hash
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
+
# @return [Object] Returns the model itself
|
106
|
+
def self.build_from_hash(attributes)
|
107
|
+
new.build_from_hash(attributes)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
self.class.openapi_types.each_pair do |key, type|
|
116
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
117
|
+
self.send("#{key}=", nil)
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
119
|
+
# check to ensure the input is an array given that the attribute
|
120
|
+
# is documented as an array but the input is not
|
121
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
122
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
123
|
+
end
|
124
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
125
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
self
|
130
|
+
end
|
131
|
+
|
132
|
+
# Deserializes the data based on type
|
133
|
+
# @param string type Data type
|
134
|
+
# @param string value Value to be deserialized
|
135
|
+
# @return [Object] Deserialized data
|
136
|
+
def _deserialize(type, value)
|
137
|
+
case type.to_sym
|
138
|
+
when :Time
|
139
|
+
Time.parse(value)
|
140
|
+
when :Date
|
141
|
+
Date.parse(value)
|
142
|
+
when :String
|
143
|
+
value
|
144
|
+
when :Integer
|
145
|
+
value.to_i
|
146
|
+
when :Float
|
147
|
+
value.to_f
|
148
|
+
when :Boolean
|
149
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
150
|
+
true
|
151
|
+
else
|
152
|
+
false
|
153
|
+
end
|
154
|
+
when :Object
|
155
|
+
# generic object (usually a Hash), return directly
|
156
|
+
value
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
160
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
163
|
+
{}.tap do |hash|
|
164
|
+
value.each do |k, v|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
else # model
|
169
|
+
# models (e.g. Pet) or oneOf
|
170
|
+
klass = MergeAccountingClient.const_get(type)
|
171
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the string representation of the object
|
176
|
+
# @return [String] String presentation of the object
|
177
|
+
def to_s
|
178
|
+
to_hash.to_s
|
179
|
+
end
|
180
|
+
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_body
|
184
|
+
to_hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the object in the form of hash
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_hash
|
190
|
+
hash = {}
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
192
|
+
value = self.send(attr)
|
193
|
+
if value.nil?
|
194
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
196
|
+
end
|
197
|
+
|
198
|
+
hash[param] = _to_hash(value)
|
199
|
+
end
|
200
|
+
hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Outputs non-array value in the form of hash
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
205
|
+
# @param [Object] value Any valid value
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
207
|
+
def _to_hash(value)
|
208
|
+
if value.is_a?(Array)
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
210
|
+
elsif value.is_a?(Hash)
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
213
|
+
end
|
214
|
+
elsif value.respond_to? :to_hash
|
215
|
+
value.to_hash
|
216
|
+
else
|
217
|
+
value
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|