merge_ruby_client 1.1.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/merge_ruby_client/accounting/accounting_periods/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/accounts/client.rb +18 -10
- data/lib/merge_ruby_client/accounting/attachments/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/audit_trail/client.rb +8 -6
- data/lib/merge_ruby_client/accounting/balance_sheets/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/bank_feed_accounts/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/bank_feed_transactions/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/cash_flow_statements/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/client.rb +14 -0
- data/lib/merge_ruby_client/accounting/company_info/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/contacts/client.rb +187 -10
- data/lib/merge_ruby_client/accounting/credit_notes/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/employees/client.rb +35 -8
- data/lib/merge_ruby_client/accounting/expense_reports/client.rb +765 -0
- data/lib/merge_ruby_client/accounting/expense_reports/types/expense_reports_lines_list_request_expand.rb +73 -0
- data/lib/merge_ruby_client/accounting/expense_reports/types/expense_reports_list_request_expand.rb +25 -0
- data/lib/merge_ruby_client/accounting/expense_reports/types/expense_reports_retrieve_request_expand.rb +25 -0
- data/lib/merge_ruby_client/accounting/expenses/client.rb +18 -10
- data/lib/merge_ruby_client/accounting/general_ledger_transactions/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/income_statements/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/invoices/client.rb +18 -10
- data/lib/merge_ruby_client/accounting/issues/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/items/client.rb +334 -2
- data/lib/merge_ruby_client/accounting/journal_entries/client.rb +18 -10
- data/lib/merge_ruby_client/accounting/linked_accounts/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/payment_methods/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/payment_terms/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/payments/client.rb +18 -10
- data/lib/merge_ruby_client/accounting/projects/client.rb +251 -0
- data/lib/merge_ruby_client/accounting/projects/types/projects_list_request_expand.rb +13 -0
- data/lib/merge_ruby_client/accounting/projects/types/projects_retrieve_request_expand.rb +13 -0
- data/lib/merge_ruby_client/accounting/purchase_orders/client.rb +18 -10
- data/lib/merge_ruby_client/accounting/sync_status/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/tax_rates/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/tracking_categories/client.rb +18 -10
- data/lib/merge_ruby_client/accounting/transactions/client.rb +2 -2
- data/lib/merge_ruby_client/accounting/transactions/types/transactions_list_request_expand.rb +32 -0
- data/lib/merge_ruby_client/accounting/transactions/types/transactions_retrieve_request_expand.rb +32 -0
- data/lib/merge_ruby_client/accounting/types/account_details_and_actions.rb +10 -2
- data/lib/merge_ruby_client/accounting/types/audit_log_event.rb +2 -0
- data/lib/merge_ruby_client/accounting/types/credit_note_line_item.rb +29 -1
- data/lib/merge_ruby_client/accounting/types/credit_note_line_item_contact.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/credit_note_line_item_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/credit_note_line_item_request.rb +29 -1
- data/lib/merge_ruby_client/accounting/types/credit_note_line_item_request_contact.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/credit_note_line_item_request_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/event_type_enum.rb +2 -0
- data/lib/merge_ruby_client/accounting/types/expense_line.rb +15 -1
- data/lib/merge_ruby_client/accounting/types/expense_line_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_line_request.rb +15 -1
- data/lib/merge_ruby_client/accounting/types/expense_line_request_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_report.rb +869 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_company.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line.rb +921 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_account.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_company.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_contact.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_employee.rb +57 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_request.rb +899 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_request_account.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_request_company.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_request_contact.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_request_employee.rb +57 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_request_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_request_tax_rate.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_line_tax_rate.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_request.rb +819 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_request_accounting_period.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_request_company.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_request_employee.rb +57 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_response.rb +101 -0
- data/lib/merge_ruby_client/accounting/types/expense_report_status_enum.rb +16 -0
- data/lib/merge_ruby_client/accounting/types/external_target_field_api_response.rb +23 -1
- data/lib/merge_ruby_client/accounting/types/field_mapping_api_instance_response.rb +23 -1
- data/lib/merge_ruby_client/accounting/types/general_ledger_transaction_line.rb +15 -1
- data/lib/merge_ruby_client/accounting/types/general_ledger_transaction_line_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/invoice_line_item.rb +29 -1
- data/lib/merge_ruby_client/accounting/types/invoice_line_item_contact.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/invoice_line_item_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/invoice_line_item_request.rb +29 -1
- data/lib/merge_ruby_client/accounting/types/invoice_line_item_request_contact.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/invoice_line_item_request_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/item.rb +18 -1
- data/lib/merge_ruby_client/accounting/types/item_request_request.rb +202 -0
- data/lib/merge_ruby_client/accounting/types/item_request_request_company.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/item_request_request_purchase_account.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/item_request_request_purchase_tax_rate.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/item_request_request_sales_account.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/item_request_request_sales_tax_rate.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/item_response.rb +101 -0
- data/lib/merge_ruby_client/accounting/types/journal_line.rb +15 -1
- data/lib/merge_ruby_client/accounting/types/journal_line_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/journal_line_request.rb +15 -1
- data/lib/merge_ruby_client/accounting/types/journal_line_request_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/paginated_expense_report_line_list.rb +80 -0
- data/lib/merge_ruby_client/accounting/types/paginated_expense_report_list.rb +80 -0
- data/lib/merge_ruby_client/accounting/types/paginated_project_list.rb +80 -0
- data/lib/merge_ruby_client/accounting/types/patched_contact_request.rb +188 -0
- data/lib/merge_ruby_client/accounting/types/patched_contact_request_addresses_item.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/patched_item_request_request.rb +172 -0
- data/lib/merge_ruby_client/accounting/types/project.rb +162 -0
- data/lib/merge_ruby_client/accounting/types/project_company.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/project_contact.rb +56 -0
- data/lib/merge_ruby_client/accounting/types/remote_field_api_response.rb +12 -1
- data/lib/merge_ruby_client/accounting/types/remote_field_class.rb +9 -1
- data/lib/merge_ruby_client/accounting/types/type_2_bb_enum.rb +16 -0
- data/lib/merge_ruby_client/accounting/types/vendor_credit_line.rb +29 -1
- data/lib/merge_ruby_client/accounting/types/vendor_credit_line_contact.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/vendor_credit_line_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/vendor_credit_line_request.rb +29 -1
- data/lib/merge_ruby_client/accounting/types/vendor_credit_line_request_contact.rb +55 -0
- data/lib/merge_ruby_client/accounting/types/vendor_credit_line_request_project.rb +55 -0
- data/lib/merge_ruby_client/accounting/vendor_credits/client.rb +2 -2
- data/lib/merge_ruby_client/ats/activities/client.rb +2 -2
- data/lib/merge_ruby_client/ats/applications/client.rb +2 -2
- data/lib/merge_ruby_client/ats/attachments/client.rb +2 -2
- data/lib/merge_ruby_client/ats/audit_trail/client.rb +8 -6
- data/lib/merge_ruby_client/ats/candidates/client.rb +2 -2
- data/lib/merge_ruby_client/ats/departments/client.rb +2 -2
- data/lib/merge_ruby_client/ats/eeocs/client.rb +2 -2
- data/lib/merge_ruby_client/ats/interviews/client.rb +2 -2
- data/lib/merge_ruby_client/ats/issues/client.rb +2 -2
- data/lib/merge_ruby_client/ats/job_interview_stages/client.rb +2 -2
- data/lib/merge_ruby_client/ats/job_postings/client.rb +2 -2
- data/lib/merge_ruby_client/ats/jobs/client.rb +4 -4
- data/lib/merge_ruby_client/ats/linked_accounts/client.rb +2 -2
- data/lib/merge_ruby_client/ats/offers/client.rb +2 -2
- data/lib/merge_ruby_client/ats/offices/client.rb +2 -2
- data/lib/merge_ruby_client/ats/reject_reasons/client.rb +2 -2
- data/lib/merge_ruby_client/ats/scorecards/client.rb +2 -2
- data/lib/merge_ruby_client/ats/sync_status/client.rb +2 -2
- data/lib/merge_ruby_client/ats/tags/client.rb +2 -2
- data/lib/merge_ruby_client/ats/types/account_details_and_actions.rb +10 -2
- data/lib/merge_ruby_client/ats/types/audit_log_event.rb +2 -0
- data/lib/merge_ruby_client/ats/types/event_type_enum.rb +2 -0
- data/lib/merge_ruby_client/ats/users/client.rb +2 -2
- data/lib/merge_ruby_client/crm/accounts/client.rb +10 -6
- data/lib/merge_ruby_client/crm/association_types/client.rb +2 -2
- data/lib/merge_ruby_client/crm/associations/client.rb +10 -2
- data/lib/merge_ruby_client/crm/audit_trail/client.rb +8 -6
- data/lib/merge_ruby_client/crm/contacts/client.rb +10 -6
- data/lib/merge_ruby_client/crm/custom_object_classes/client.rb +2 -2
- data/lib/merge_ruby_client/crm/custom_objects/client.rb +14 -6
- data/lib/merge_ruby_client/crm/engagement_types/client.rb +10 -6
- data/lib/merge_ruby_client/crm/engagements/client.rb +10 -6
- data/lib/merge_ruby_client/crm/issues/client.rb +2 -2
- data/lib/merge_ruby_client/crm/leads/client.rb +10 -6
- data/lib/merge_ruby_client/crm/linked_accounts/client.rb +2 -2
- data/lib/merge_ruby_client/crm/notes/client.rb +10 -6
- data/lib/merge_ruby_client/crm/opportunities/client.rb +10 -6
- data/lib/merge_ruby_client/crm/stages/client.rb +10 -6
- data/lib/merge_ruby_client/crm/sync_status/client.rb +22 -8
- data/lib/merge_ruby_client/crm/tasks/client.rb +10 -6
- data/lib/merge_ruby_client/crm/types/audit_log_event.rb +2 -0
- data/lib/merge_ruby_client/crm/types/custom_object_request.rb +26 -3
- data/lib/merge_ruby_client/crm/types/event_type_enum.rb +2 -0
- data/lib/merge_ruby_client/crm/types/remote_field_class.rb +9 -1
- data/lib/merge_ruby_client/crm/users/client.rb +10 -6
- data/lib/merge_ruby_client/filestorage/audit_trail/client.rb +8 -6
- data/lib/merge_ruby_client/filestorage/drives/client.rb +2 -2
- data/lib/merge_ruby_client/filestorage/files/client.rb +70 -16
- data/lib/merge_ruby_client/filestorage/files/types/files_download_request_meta_list_request_order_by.rb +14 -0
- data/lib/merge_ruby_client/filestorage/files/types/files_list_request_order_by.rb +14 -0
- data/lib/merge_ruby_client/filestorage/folders/client.rb +2 -2
- data/lib/merge_ruby_client/filestorage/groups/client.rb +2 -2
- data/lib/merge_ruby_client/filestorage/issues/client.rb +2 -2
- data/lib/merge_ruby_client/filestorage/linked_accounts/client.rb +2 -2
- data/lib/merge_ruby_client/filestorage/sync_status/client.rb +22 -8
- data/lib/merge_ruby_client/filestorage/types/account_details_and_actions.rb +10 -2
- data/lib/merge_ruby_client/filestorage/types/audit_log_event.rb +2 -0
- data/lib/merge_ruby_client/filestorage/types/download_request_meta.rb +2 -9
- data/lib/merge_ruby_client/filestorage/types/event_type_enum.rb +2 -0
- data/lib/merge_ruby_client/filestorage/types/file.rb +13 -1
- data/lib/merge_ruby_client/filestorage/types/file_request.rb +13 -1
- data/lib/merge_ruby_client/filestorage/users/client.rb +2 -2
- data/lib/merge_ruby_client/hris/audit_trail/client.rb +8 -6
- data/lib/merge_ruby_client/hris/bank_info/client.rb +2 -2
- data/lib/merge_ruby_client/hris/benefits/client.rb +2 -2
- data/lib/merge_ruby_client/hris/companies/client.rb +2 -2
- data/lib/merge_ruby_client/hris/dependents/client.rb +8 -4
- data/lib/merge_ruby_client/hris/employee_payroll_runs/client.rb +2 -2
- data/lib/merge_ruby_client/hris/employees/client.rb +8 -4
- data/lib/merge_ruby_client/hris/employer_benefits/client.rb +2 -2
- data/lib/merge_ruby_client/hris/employments/client.rb +2 -2
- data/lib/merge_ruby_client/hris/groups/client.rb +2 -2
- data/lib/merge_ruby_client/hris/issues/client.rb +2 -2
- data/lib/merge_ruby_client/hris/linked_accounts/client.rb +2 -2
- data/lib/merge_ruby_client/hris/locations/client.rb +2 -2
- data/lib/merge_ruby_client/hris/pay_groups/client.rb +2 -2
- data/lib/merge_ruby_client/hris/payroll_runs/client.rb +2 -2
- data/lib/merge_ruby_client/hris/sync_status/client.rb +2 -2
- data/lib/merge_ruby_client/hris/teams/client.rb +2 -2
- data/lib/merge_ruby_client/hris/time_off/client.rb +2 -2
- data/lib/merge_ruby_client/hris/time_off_balances/client.rb +2 -2
- data/lib/merge_ruby_client/hris/timesheet_entries/client.rb +2 -2
- data/lib/merge_ruby_client/hris/types/account_details_and_actions.rb +10 -2
- data/lib/merge_ruby_client/hris/types/audit_log_event.rb +2 -0
- data/lib/merge_ruby_client/hris/types/benefit.rb +9 -9
- data/lib/merge_ruby_client/hris/types/event_type_enum.rb +2 -0
- data/lib/merge_ruby_client/ticketing/accounts/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/attachments/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/audit_trail/client.rb +8 -6
- data/lib/merge_ruby_client/ticketing/collections/client.rb +4 -4
- data/lib/merge_ruby_client/ticketing/comments/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/contacts/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/issues/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/linked_accounts/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/projects/client.rb +4 -4
- data/lib/merge_ruby_client/ticketing/roles/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/sync_status/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/tags/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/teams/client.rb +2 -2
- data/lib/merge_ruby_client/ticketing/tickets/client.rb +40 -20
- data/lib/merge_ruby_client/ticketing/types/account_details_and_actions.rb +10 -2
- data/lib/merge_ruby_client/ticketing/types/audit_log_event.rb +2 -0
- data/lib/merge_ruby_client/ticketing/types/collection.rb +18 -16
- data/lib/merge_ruby_client/ticketing/types/{access_level_enum.rb → collection_access_level_enum.rb} +3 -1
- data/lib/merge_ruby_client/ticketing/types/event_type_enum.rb +2 -0
- data/lib/merge_ruby_client/ticketing/types/patched_ticket_request.rb +28 -9
- data/lib/merge_ruby_client/ticketing/types/remote_field_class.rb +9 -1
- data/lib/merge_ruby_client/ticketing/types/ticket.rb +20 -1
- data/lib/merge_ruby_client/ticketing/types/ticket_access_level_enum.rb +16 -0
- data/lib/merge_ruby_client/ticketing/types/ticket_request.rb +20 -1
- data/lib/merge_ruby_client/ticketing/users/client.rb +2 -2
- data/lib/merge_ruby_client.rb +14 -14
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +473 -409
- metadata +69 -3
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
require "date"
|
|
4
4
|
require_relative "invoice_line_item_employee"
|
|
5
|
+
require_relative "invoice_line_item_project"
|
|
6
|
+
require_relative "invoice_line_item_contact"
|
|
5
7
|
require_relative "transaction_currency_enum"
|
|
6
8
|
require_relative "invoice_line_item_item"
|
|
7
9
|
require_relative "invoice_line_item_account"
|
|
@@ -38,6 +40,10 @@ module Merge
|
|
|
38
40
|
attr_reader :total_amount
|
|
39
41
|
# @return [Merge::Accounting::InvoiceLineItemEmployee] The employee this overall transaction relates to.
|
|
40
42
|
attr_reader :employee
|
|
43
|
+
# @return [Merge::Accounting::InvoiceLineItemProject]
|
|
44
|
+
attr_reader :project
|
|
45
|
+
# @return [Merge::Accounting::InvoiceLineItemContact] The invoice's contact.
|
|
46
|
+
attr_reader :contact
|
|
41
47
|
# @return [Merge::Accounting::TransactionCurrencyEnum] The line item's currency.
|
|
42
48
|
# * `XUA` - ADB Unit of Account
|
|
43
49
|
# * `AFN` - Afghan Afghani
|
|
@@ -386,6 +392,8 @@ module Merge
|
|
|
386
392
|
# @param quantity [Float] The line item's quantity.
|
|
387
393
|
# @param total_amount [Float] The line item's total amount.
|
|
388
394
|
# @param employee [Merge::Accounting::InvoiceLineItemEmployee] The employee this overall transaction relates to.
|
|
395
|
+
# @param project [Merge::Accounting::InvoiceLineItemProject]
|
|
396
|
+
# @param contact [Merge::Accounting::InvoiceLineItemContact] The invoice's contact.
|
|
389
397
|
# @param currency [Merge::Accounting::TransactionCurrencyEnum] The line item's currency.
|
|
390
398
|
# * `XUA` - ADB Unit of Account
|
|
391
399
|
# * `AFN` - Afghan Afghani
|
|
@@ -709,7 +717,7 @@ module Merge
|
|
|
709
717
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
710
718
|
# @return [Merge::Accounting::InvoiceLineItem]
|
|
711
719
|
def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, description: OMIT,
|
|
712
|
-
unit_price: OMIT, quantity: OMIT, total_amount: OMIT, employee: OMIT, currency: OMIT, exchange_rate: OMIT, item: OMIT, account: OMIT, tax_rate: OMIT, tracking_category: OMIT, tracking_categories: OMIT, company: OMIT, remote_was_deleted: OMIT, field_mappings: OMIT, remote_fields: OMIT, additional_properties: nil)
|
|
720
|
+
unit_price: OMIT, quantity: OMIT, total_amount: OMIT, employee: OMIT, project: OMIT, contact: OMIT, currency: OMIT, exchange_rate: OMIT, item: OMIT, account: OMIT, tax_rate: OMIT, tracking_category: OMIT, tracking_categories: OMIT, company: OMIT, remote_was_deleted: OMIT, field_mappings: OMIT, remote_fields: OMIT, additional_properties: nil)
|
|
713
721
|
@id = id if id != OMIT
|
|
714
722
|
@remote_id = remote_id if remote_id != OMIT
|
|
715
723
|
@created_at = created_at if created_at != OMIT
|
|
@@ -719,6 +727,8 @@ module Merge
|
|
|
719
727
|
@quantity = quantity if quantity != OMIT
|
|
720
728
|
@total_amount = total_amount if total_amount != OMIT
|
|
721
729
|
@employee = employee if employee != OMIT
|
|
730
|
+
@project = project if project != OMIT
|
|
731
|
+
@contact = contact if contact != OMIT
|
|
722
732
|
@currency = currency if currency != OMIT
|
|
723
733
|
@exchange_rate = exchange_rate if exchange_rate != OMIT
|
|
724
734
|
@item = item if item != OMIT
|
|
@@ -741,6 +751,8 @@ module Merge
|
|
|
741
751
|
"quantity": quantity,
|
|
742
752
|
"total_amount": total_amount,
|
|
743
753
|
"employee": employee,
|
|
754
|
+
"project": project,
|
|
755
|
+
"contact": contact,
|
|
744
756
|
"currency": currency,
|
|
745
757
|
"exchange_rate": exchange_rate,
|
|
746
758
|
"item": item,
|
|
@@ -778,6 +790,18 @@ module Merge
|
|
|
778
790
|
employee = parsed_json["employee"].to_json
|
|
779
791
|
employee = Merge::Accounting::InvoiceLineItemEmployee.from_json(json_object: employee)
|
|
780
792
|
end
|
|
793
|
+
if parsed_json["project"].nil?
|
|
794
|
+
project = nil
|
|
795
|
+
else
|
|
796
|
+
project = parsed_json["project"].to_json
|
|
797
|
+
project = Merge::Accounting::InvoiceLineItemProject.from_json(json_object: project)
|
|
798
|
+
end
|
|
799
|
+
if parsed_json["contact"].nil?
|
|
800
|
+
contact = nil
|
|
801
|
+
else
|
|
802
|
+
contact = parsed_json["contact"].to_json
|
|
803
|
+
contact = Merge::Accounting::InvoiceLineItemContact.from_json(json_object: contact)
|
|
804
|
+
end
|
|
781
805
|
currency = parsed_json["currency"]
|
|
782
806
|
exchange_rate = parsed_json["exchange_rate"]
|
|
783
807
|
if parsed_json["item"].nil?
|
|
@@ -820,6 +844,8 @@ module Merge
|
|
|
820
844
|
quantity: quantity,
|
|
821
845
|
total_amount: total_amount,
|
|
822
846
|
employee: employee,
|
|
847
|
+
project: project,
|
|
848
|
+
contact: contact,
|
|
823
849
|
currency: currency,
|
|
824
850
|
exchange_rate: exchange_rate,
|
|
825
851
|
item: item,
|
|
@@ -858,6 +884,8 @@ module Merge
|
|
|
858
884
|
obj.quantity&.is_a?(Float) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
|
|
859
885
|
obj.total_amount&.is_a?(Float) != false || raise("Passed value for field obj.total_amount is not the expected type, validation failed.")
|
|
860
886
|
obj.employee.nil? || Merge::Accounting::InvoiceLineItemEmployee.validate_raw(obj: obj.employee)
|
|
887
|
+
obj.project.nil? || Merge::Accounting::InvoiceLineItemProject.validate_raw(obj: obj.project)
|
|
888
|
+
obj.contact.nil? || Merge::Accounting::InvoiceLineItemContact.validate_raw(obj: obj.contact)
|
|
861
889
|
obj.currency&.is_a?(Merge::Accounting::TransactionCurrencyEnum) != false || raise("Passed value for field obj.currency is not the expected type, validation failed.")
|
|
862
890
|
obj.exchange_rate&.is_a?(String) != false || raise("Passed value for field obj.exchange_rate is not the expected type, validation failed.")
|
|
863
891
|
obj.item.nil? || Merge::Accounting::InvoiceLineItemItem.validate_raw(obj: obj.item)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "json"
|
|
4
|
+
require_relative "contact"
|
|
5
|
+
|
|
6
|
+
module Merge
|
|
7
|
+
module Accounting
|
|
8
|
+
# The invoice's contact.
|
|
9
|
+
class InvoiceLineItemContact
|
|
10
|
+
# Deserialize a JSON object to an instance of InvoiceLineItemContact
|
|
11
|
+
#
|
|
12
|
+
# @param json_object [String]
|
|
13
|
+
# @return [Merge::Accounting::InvoiceLineItemContact]
|
|
14
|
+
def self.from_json(json_object:)
|
|
15
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
16
|
+
begin
|
|
17
|
+
struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
|
|
18
|
+
return struct unless struct.nil?
|
|
19
|
+
|
|
20
|
+
return nil
|
|
21
|
+
rescue StandardError
|
|
22
|
+
# noop
|
|
23
|
+
end
|
|
24
|
+
begin
|
|
25
|
+
Merge::Accounting::Contact.validate_raw(obj: struct)
|
|
26
|
+
return Merge::Accounting::Contact.from_json(json_object: struct) unless struct.nil?
|
|
27
|
+
|
|
28
|
+
return nil
|
|
29
|
+
rescue StandardError
|
|
30
|
+
# noop
|
|
31
|
+
end
|
|
32
|
+
struct
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
36
|
+
# hash and check each fields type against the current object's property
|
|
37
|
+
# definitions.
|
|
38
|
+
#
|
|
39
|
+
# @param obj [Object]
|
|
40
|
+
# @return [Void]
|
|
41
|
+
def self.validate_raw(obj:)
|
|
42
|
+
begin
|
|
43
|
+
return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
|
44
|
+
rescue StandardError
|
|
45
|
+
# noop
|
|
46
|
+
end
|
|
47
|
+
begin
|
|
48
|
+
return Merge::Accounting::Contact.validate_raw(obj: obj)
|
|
49
|
+
rescue StandardError
|
|
50
|
+
# noop
|
|
51
|
+
end
|
|
52
|
+
raise("Passed value matched no type within the union, validation failed.")
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "json"
|
|
4
|
+
require_relative "project"
|
|
5
|
+
|
|
6
|
+
module Merge
|
|
7
|
+
module Accounting
|
|
8
|
+
class InvoiceLineItemProject
|
|
9
|
+
# Deserialize a JSON object to an instance of InvoiceLineItemProject
|
|
10
|
+
#
|
|
11
|
+
# @param json_object [String]
|
|
12
|
+
# @return [Merge::Accounting::InvoiceLineItemProject]
|
|
13
|
+
def self.from_json(json_object:)
|
|
14
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
15
|
+
begin
|
|
16
|
+
struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
|
|
17
|
+
return struct unless struct.nil?
|
|
18
|
+
|
|
19
|
+
return nil
|
|
20
|
+
rescue StandardError
|
|
21
|
+
# noop
|
|
22
|
+
end
|
|
23
|
+
begin
|
|
24
|
+
Merge::Accounting::Project.validate_raw(obj: struct)
|
|
25
|
+
return Merge::Accounting::Project.from_json(json_object: struct) unless struct.nil?
|
|
26
|
+
|
|
27
|
+
return nil
|
|
28
|
+
rescue StandardError
|
|
29
|
+
# noop
|
|
30
|
+
end
|
|
31
|
+
struct
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
35
|
+
# hash and check each fields type against the current object's property
|
|
36
|
+
# definitions.
|
|
37
|
+
#
|
|
38
|
+
# @param obj [Object]
|
|
39
|
+
# @return [Void]
|
|
40
|
+
def self.validate_raw(obj:)
|
|
41
|
+
begin
|
|
42
|
+
return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
|
43
|
+
rescue StandardError
|
|
44
|
+
# noop
|
|
45
|
+
end
|
|
46
|
+
begin
|
|
47
|
+
return Merge::Accounting::Project.validate_raw(obj: obj)
|
|
48
|
+
rescue StandardError
|
|
49
|
+
# noop
|
|
50
|
+
end
|
|
51
|
+
raise("Passed value matched no type within the union, validation failed.")
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative "invoice_line_item_request_employee"
|
|
4
|
+
require_relative "invoice_line_item_request_project"
|
|
5
|
+
require_relative "invoice_line_item_request_contact"
|
|
4
6
|
require_relative "transaction_currency_enum"
|
|
5
7
|
require_relative "invoice_line_item_request_item"
|
|
6
8
|
require_relative "invoice_line_item_request_account"
|
|
@@ -31,6 +33,10 @@ module Merge
|
|
|
31
33
|
attr_reader :total_amount
|
|
32
34
|
# @return [Merge::Accounting::InvoiceLineItemRequestEmployee] The employee this overall transaction relates to.
|
|
33
35
|
attr_reader :employee
|
|
36
|
+
# @return [Merge::Accounting::InvoiceLineItemRequestProject]
|
|
37
|
+
attr_reader :project
|
|
38
|
+
# @return [Merge::Accounting::InvoiceLineItemRequestContact] The invoice's contact.
|
|
39
|
+
attr_reader :contact
|
|
34
40
|
# @return [Merge::Accounting::TransactionCurrencyEnum] The line item's currency.
|
|
35
41
|
# * `XUA` - ADB Unit of Account
|
|
36
42
|
# * `AFN` - Afghan Afghani
|
|
@@ -373,6 +379,8 @@ module Merge
|
|
|
373
379
|
# @param quantity [Float] The line item's quantity.
|
|
374
380
|
# @param total_amount [Float] The line item's total amount.
|
|
375
381
|
# @param employee [Merge::Accounting::InvoiceLineItemRequestEmployee] The employee this overall transaction relates to.
|
|
382
|
+
# @param project [Merge::Accounting::InvoiceLineItemRequestProject]
|
|
383
|
+
# @param contact [Merge::Accounting::InvoiceLineItemRequestContact] The invoice's contact.
|
|
376
384
|
# @param currency [Merge::Accounting::TransactionCurrencyEnum] The line item's currency.
|
|
377
385
|
# * `XUA` - ADB Unit of Account
|
|
378
386
|
# * `AFN` - Afghan Afghani
|
|
@@ -693,13 +701,15 @@ module Merge
|
|
|
693
701
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
694
702
|
# @return [Merge::Accounting::InvoiceLineItemRequest]
|
|
695
703
|
def initialize(remote_id: OMIT, description: OMIT, unit_price: OMIT, quantity: OMIT, total_amount: OMIT,
|
|
696
|
-
employee: OMIT, currency: OMIT, exchange_rate: OMIT, item: OMIT, account: OMIT, tax_rate: OMIT, tracking_category: OMIT, tracking_categories: OMIT, company: OMIT, integration_params: OMIT, linked_account_params: OMIT, remote_fields: OMIT, additional_properties: nil)
|
|
704
|
+
employee: OMIT, project: OMIT, contact: OMIT, currency: OMIT, exchange_rate: OMIT, item: OMIT, account: OMIT, tax_rate: OMIT, tracking_category: OMIT, tracking_categories: OMIT, company: OMIT, integration_params: OMIT, linked_account_params: OMIT, remote_fields: OMIT, additional_properties: nil)
|
|
697
705
|
@remote_id = remote_id if remote_id != OMIT
|
|
698
706
|
@description = description if description != OMIT
|
|
699
707
|
@unit_price = unit_price if unit_price != OMIT
|
|
700
708
|
@quantity = quantity if quantity != OMIT
|
|
701
709
|
@total_amount = total_amount if total_amount != OMIT
|
|
702
710
|
@employee = employee if employee != OMIT
|
|
711
|
+
@project = project if project != OMIT
|
|
712
|
+
@contact = contact if contact != OMIT
|
|
703
713
|
@currency = currency if currency != OMIT
|
|
704
714
|
@exchange_rate = exchange_rate if exchange_rate != OMIT
|
|
705
715
|
@item = item if item != OMIT
|
|
@@ -719,6 +729,8 @@ module Merge
|
|
|
719
729
|
"quantity": quantity,
|
|
720
730
|
"total_amount": total_amount,
|
|
721
731
|
"employee": employee,
|
|
732
|
+
"project": project,
|
|
733
|
+
"contact": contact,
|
|
722
734
|
"currency": currency,
|
|
723
735
|
"exchange_rate": exchange_rate,
|
|
724
736
|
"item": item,
|
|
@@ -753,6 +765,18 @@ module Merge
|
|
|
753
765
|
employee = parsed_json["employee"].to_json
|
|
754
766
|
employee = Merge::Accounting::InvoiceLineItemRequestEmployee.from_json(json_object: employee)
|
|
755
767
|
end
|
|
768
|
+
if parsed_json["project"].nil?
|
|
769
|
+
project = nil
|
|
770
|
+
else
|
|
771
|
+
project = parsed_json["project"].to_json
|
|
772
|
+
project = Merge::Accounting::InvoiceLineItemRequestProject.from_json(json_object: project)
|
|
773
|
+
end
|
|
774
|
+
if parsed_json["contact"].nil?
|
|
775
|
+
contact = nil
|
|
776
|
+
else
|
|
777
|
+
contact = parsed_json["contact"].to_json
|
|
778
|
+
contact = Merge::Accounting::InvoiceLineItemRequestContact.from_json(json_object: contact)
|
|
779
|
+
end
|
|
756
780
|
currency = parsed_json["currency"]
|
|
757
781
|
exchange_rate = parsed_json["exchange_rate"]
|
|
758
782
|
if parsed_json["item"].nil?
|
|
@@ -792,6 +816,8 @@ module Merge
|
|
|
792
816
|
quantity: quantity,
|
|
793
817
|
total_amount: total_amount,
|
|
794
818
|
employee: employee,
|
|
819
|
+
project: project,
|
|
820
|
+
contact: contact,
|
|
795
821
|
currency: currency,
|
|
796
822
|
exchange_rate: exchange_rate,
|
|
797
823
|
item: item,
|
|
@@ -827,6 +853,8 @@ module Merge
|
|
|
827
853
|
obj.quantity&.is_a?(Float) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
|
|
828
854
|
obj.total_amount&.is_a?(Float) != false || raise("Passed value for field obj.total_amount is not the expected type, validation failed.")
|
|
829
855
|
obj.employee.nil? || Merge::Accounting::InvoiceLineItemRequestEmployee.validate_raw(obj: obj.employee)
|
|
856
|
+
obj.project.nil? || Merge::Accounting::InvoiceLineItemRequestProject.validate_raw(obj: obj.project)
|
|
857
|
+
obj.contact.nil? || Merge::Accounting::InvoiceLineItemRequestContact.validate_raw(obj: obj.contact)
|
|
830
858
|
obj.currency&.is_a?(Merge::Accounting::TransactionCurrencyEnum) != false || raise("Passed value for field obj.currency is not the expected type, validation failed.")
|
|
831
859
|
obj.exchange_rate&.is_a?(String) != false || raise("Passed value for field obj.exchange_rate is not the expected type, validation failed.")
|
|
832
860
|
obj.item.nil? || Merge::Accounting::InvoiceLineItemRequestItem.validate_raw(obj: obj.item)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "json"
|
|
4
|
+
require_relative "contact"
|
|
5
|
+
|
|
6
|
+
module Merge
|
|
7
|
+
module Accounting
|
|
8
|
+
# The invoice's contact.
|
|
9
|
+
class InvoiceLineItemRequestContact
|
|
10
|
+
# Deserialize a JSON object to an instance of InvoiceLineItemRequestContact
|
|
11
|
+
#
|
|
12
|
+
# @param json_object [String]
|
|
13
|
+
# @return [Merge::Accounting::InvoiceLineItemRequestContact]
|
|
14
|
+
def self.from_json(json_object:)
|
|
15
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
16
|
+
begin
|
|
17
|
+
struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
|
|
18
|
+
return struct unless struct.nil?
|
|
19
|
+
|
|
20
|
+
return nil
|
|
21
|
+
rescue StandardError
|
|
22
|
+
# noop
|
|
23
|
+
end
|
|
24
|
+
begin
|
|
25
|
+
Merge::Accounting::Contact.validate_raw(obj: struct)
|
|
26
|
+
return Merge::Accounting::Contact.from_json(json_object: struct) unless struct.nil?
|
|
27
|
+
|
|
28
|
+
return nil
|
|
29
|
+
rescue StandardError
|
|
30
|
+
# noop
|
|
31
|
+
end
|
|
32
|
+
struct
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
36
|
+
# hash and check each fields type against the current object's property
|
|
37
|
+
# definitions.
|
|
38
|
+
#
|
|
39
|
+
# @param obj [Object]
|
|
40
|
+
# @return [Void]
|
|
41
|
+
def self.validate_raw(obj:)
|
|
42
|
+
begin
|
|
43
|
+
return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
|
44
|
+
rescue StandardError
|
|
45
|
+
# noop
|
|
46
|
+
end
|
|
47
|
+
begin
|
|
48
|
+
return Merge::Accounting::Contact.validate_raw(obj: obj)
|
|
49
|
+
rescue StandardError
|
|
50
|
+
# noop
|
|
51
|
+
end
|
|
52
|
+
raise("Passed value matched no type within the union, validation failed.")
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "json"
|
|
4
|
+
require_relative "project"
|
|
5
|
+
|
|
6
|
+
module Merge
|
|
7
|
+
module Accounting
|
|
8
|
+
class InvoiceLineItemRequestProject
|
|
9
|
+
# Deserialize a JSON object to an instance of InvoiceLineItemRequestProject
|
|
10
|
+
#
|
|
11
|
+
# @param json_object [String]
|
|
12
|
+
# @return [Merge::Accounting::InvoiceLineItemRequestProject]
|
|
13
|
+
def self.from_json(json_object:)
|
|
14
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
15
|
+
begin
|
|
16
|
+
struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
|
|
17
|
+
return struct unless struct.nil?
|
|
18
|
+
|
|
19
|
+
return nil
|
|
20
|
+
rescue StandardError
|
|
21
|
+
# noop
|
|
22
|
+
end
|
|
23
|
+
begin
|
|
24
|
+
Merge::Accounting::Project.validate_raw(obj: struct)
|
|
25
|
+
return Merge::Accounting::Project.from_json(json_object: struct) unless struct.nil?
|
|
26
|
+
|
|
27
|
+
return nil
|
|
28
|
+
rescue StandardError
|
|
29
|
+
# noop
|
|
30
|
+
end
|
|
31
|
+
struct
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
35
|
+
# hash and check each fields type against the current object's property
|
|
36
|
+
# definitions.
|
|
37
|
+
#
|
|
38
|
+
# @param obj [Object]
|
|
39
|
+
# @return [Void]
|
|
40
|
+
def self.validate_raw(obj:)
|
|
41
|
+
begin
|
|
42
|
+
return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
|
43
|
+
rescue StandardError
|
|
44
|
+
# noop
|
|
45
|
+
end
|
|
46
|
+
begin
|
|
47
|
+
return Merge::Accounting::Project.validate_raw(obj: obj)
|
|
48
|
+
rescue StandardError
|
|
49
|
+
# noop
|
|
50
|
+
end
|
|
51
|
+
raise("Passed value matched no type within the union, validation failed.")
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require "date"
|
|
4
4
|
require_relative "status_7_d_1_enum"
|
|
5
|
+
require_relative "type_2_bb_enum"
|
|
5
6
|
require_relative "item_purchase_account"
|
|
6
7
|
require_relative "item_sales_account"
|
|
7
8
|
require_relative "item_company"
|
|
@@ -33,6 +34,12 @@ module Merge
|
|
|
33
34
|
# * `ACTIVE` - ACTIVE
|
|
34
35
|
# * `ARCHIVED` - ARCHIVED
|
|
35
36
|
attr_reader :status
|
|
37
|
+
# @return [Merge::Accounting::Type2BbEnum] The item's type.
|
|
38
|
+
# * `INVENTORY` - INVENTORY
|
|
39
|
+
# * `NON_INVENTORY` - NON_INVENTORY
|
|
40
|
+
# * `SERVICE` - SERVICE
|
|
41
|
+
# * `UNKNOWN` - UNKNOWN
|
|
42
|
+
attr_reader :type
|
|
36
43
|
# @return [Float] The item's unit price.
|
|
37
44
|
attr_reader :unit_price
|
|
38
45
|
# @return [Float] The price at which the item is purchased from a vendor.
|
|
@@ -74,6 +81,11 @@ module Merge
|
|
|
74
81
|
# @param status [Merge::Accounting::Status7D1Enum] The item's status.
|
|
75
82
|
# * `ACTIVE` - ACTIVE
|
|
76
83
|
# * `ARCHIVED` - ARCHIVED
|
|
84
|
+
# @param type [Merge::Accounting::Type2BbEnum] The item's type.
|
|
85
|
+
# * `INVENTORY` - INVENTORY
|
|
86
|
+
# * `NON_INVENTORY` - NON_INVENTORY
|
|
87
|
+
# * `SERVICE` - SERVICE
|
|
88
|
+
# * `UNKNOWN` - UNKNOWN
|
|
77
89
|
# @param unit_price [Float] The item's unit price.
|
|
78
90
|
# @param purchase_price [Float] The price at which the item is purchased from a vendor.
|
|
79
91
|
# @param purchase_account [Merge::Accounting::ItemPurchaseAccount] References the default account used to record a purchase of the item.
|
|
@@ -91,13 +103,14 @@ module Merge
|
|
|
91
103
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
92
104
|
# @return [Merge::Accounting::Item]
|
|
93
105
|
def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, name: OMIT, status: OMIT,
|
|
94
|
-
unit_price: OMIT, purchase_price: OMIT, purchase_account: OMIT, sales_account: OMIT, company: OMIT, purchase_tax_rate: OMIT, sales_tax_rate: OMIT, remote_updated_at: OMIT, remote_was_deleted: OMIT, field_mappings: OMIT, remote_data: OMIT, additional_properties: nil)
|
|
106
|
+
type: OMIT, unit_price: OMIT, purchase_price: OMIT, purchase_account: OMIT, sales_account: OMIT, company: OMIT, purchase_tax_rate: OMIT, sales_tax_rate: OMIT, remote_updated_at: OMIT, remote_was_deleted: OMIT, field_mappings: OMIT, remote_data: OMIT, additional_properties: nil)
|
|
95
107
|
@id = id if id != OMIT
|
|
96
108
|
@remote_id = remote_id if remote_id != OMIT
|
|
97
109
|
@created_at = created_at if created_at != OMIT
|
|
98
110
|
@modified_at = modified_at if modified_at != OMIT
|
|
99
111
|
@name = name if name != OMIT
|
|
100
112
|
@status = status if status != OMIT
|
|
113
|
+
@type = type if type != OMIT
|
|
101
114
|
@unit_price = unit_price if unit_price != OMIT
|
|
102
115
|
@purchase_price = purchase_price if purchase_price != OMIT
|
|
103
116
|
@purchase_account = purchase_account if purchase_account != OMIT
|
|
@@ -117,6 +130,7 @@ module Merge
|
|
|
117
130
|
"modified_at": modified_at,
|
|
118
131
|
"name": name,
|
|
119
132
|
"status": status,
|
|
133
|
+
"type": type,
|
|
120
134
|
"unit_price": unit_price,
|
|
121
135
|
"purchase_price": purchase_price,
|
|
122
136
|
"purchase_account": purchase_account,
|
|
@@ -146,6 +160,7 @@ module Merge
|
|
|
146
160
|
modified_at = (DateTime.parse(parsed_json["modified_at"]) unless parsed_json["modified_at"].nil?)
|
|
147
161
|
name = parsed_json["name"]
|
|
148
162
|
status = parsed_json["status"]
|
|
163
|
+
type = parsed_json["type"]
|
|
149
164
|
unit_price = parsed_json["unit_price"]
|
|
150
165
|
purchase_price = parsed_json["purchase_price"]
|
|
151
166
|
if parsed_json["purchase_account"].nil?
|
|
@@ -194,6 +209,7 @@ module Merge
|
|
|
194
209
|
modified_at: modified_at,
|
|
195
210
|
name: name,
|
|
196
211
|
status: status,
|
|
212
|
+
type: type,
|
|
197
213
|
unit_price: unit_price,
|
|
198
214
|
purchase_price: purchase_price,
|
|
199
215
|
purchase_account: purchase_account,
|
|
@@ -229,6 +245,7 @@ module Merge
|
|
|
229
245
|
obj.modified_at&.is_a?(DateTime) != false || raise("Passed value for field obj.modified_at is not the expected type, validation failed.")
|
|
230
246
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
231
247
|
obj.status&.is_a?(Merge::Accounting::Status7D1Enum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
|
248
|
+
obj.type&.is_a?(Merge::Accounting::Type2BbEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
|
232
249
|
obj.unit_price&.is_a?(Float) != false || raise("Passed value for field obj.unit_price is not the expected type, validation failed.")
|
|
233
250
|
obj.purchase_price&.is_a?(Float) != false || raise("Passed value for field obj.purchase_price is not the expected type, validation failed.")
|
|
234
251
|
obj.purchase_account.nil? || Merge::Accounting::ItemPurchaseAccount.validate_raw(obj: obj.purchase_account)
|