netsuite-soap 2025.2.3
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 +7 -0
- data/.envrc +9 -0
- data/.github/FUNDING.yml +1 -0
- data/.github/dependabot.yml +14 -0
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/.github/workflows/main.yml +55 -0
- data/.github/workflows/publish.yml +53 -0
- data/.gitignore +23 -0
- data/.rspec +6 -0
- data/.ruby-version +1 -0
- data/.tool-versions +1 -0
- data/AGENTS.md +150 -0
- data/CLAUDE.md +111 -0
- data/DEVELOPMENT.md +34 -0
- data/Gemfile +10 -0
- data/HISTORY.md +171 -0
- data/LICENSE +22 -0
- data/README.md +87 -0
- data/Rakefile +130 -0
- data/docs/async.md +46 -0
- data/docs/configuration.md +88 -0
- data/docs/contributing.md +36 -0
- data/docs/usage.md +149 -0
- data/lib/netsuite/actions/abstract_action.rb +32 -0
- data/lib/netsuite/actions/add.rb +93 -0
- data/lib/netsuite/actions/async_add_list.rb +74 -0
- data/lib/netsuite/actions/async_delete_list.rb +40 -0
- data/lib/netsuite/actions/async_get_list.rb +46 -0
- data/lib/netsuite/actions/async_initialize_list.rb +85 -0
- data/lib/netsuite/actions/async_response.rb +52 -0
- data/lib/netsuite/actions/async_search.rb +36 -0
- data/lib/netsuite/actions/async_update_list.rb +53 -0
- data/lib/netsuite/actions/async_upsert_list.rb +53 -0
- data/lib/netsuite/actions/attach_file.rb +87 -0
- data/lib/netsuite/actions/check_async_status.rb +29 -0
- data/lib/netsuite/actions/delete.rb +102 -0
- data/lib/netsuite/actions/delete_list.rb +108 -0
- data/lib/netsuite/actions/get.rb +87 -0
- data/lib/netsuite/actions/get_all.rb +78 -0
- data/lib/netsuite/actions/get_async_result.rb +35 -0
- data/lib/netsuite/actions/get_deleted.rb +92 -0
- data/lib/netsuite/actions/get_list.rb +98 -0
- data/lib/netsuite/actions/get_select_value.rb +80 -0
- data/lib/netsuite/actions/initialize.rb +86 -0
- data/lib/netsuite/actions/search.rb +265 -0
- data/lib/netsuite/actions/update.rb +86 -0
- data/lib/netsuite/actions/update_list.rb +113 -0
- data/lib/netsuite/actions/upsert.rb +86 -0
- data/lib/netsuite/actions/upsert_list.rb +118 -0
- data/lib/netsuite/client.rb +19 -0
- data/lib/netsuite/configuration.rb +470 -0
- data/lib/netsuite/errors.rb +18 -0
- data/lib/netsuite/namespaces/act_sched.rb +11 -0
- data/lib/netsuite/namespaces/comm_general.rb +11 -0
- data/lib/netsuite/namespaces/file_cabinet.rb +11 -0
- data/lib/netsuite/namespaces/list_acct.rb +11 -0
- data/lib/netsuite/namespaces/list_emp.rb +12 -0
- data/lib/netsuite/namespaces/list_mkt.rb +12 -0
- data/lib/netsuite/namespaces/list_rel.rb +11 -0
- data/lib/netsuite/namespaces/list_support.rb +11 -0
- data/lib/netsuite/namespaces/list_website.rb +11 -0
- data/lib/netsuite/namespaces/platform_common.rb +11 -0
- data/lib/netsuite/namespaces/platform_core.rb +11 -0
- data/lib/netsuite/namespaces/setup_custom.rb +11 -0
- data/lib/netsuite/namespaces/tran_bank.rb +11 -0
- data/lib/netsuite/namespaces/tran_cust.rb +11 -0
- data/lib/netsuite/namespaces/tran_emp.rb +11 -0
- data/lib/netsuite/namespaces/tran_general.rb +11 -0
- data/lib/netsuite/namespaces/tran_invt.rb +11 -0
- data/lib/netsuite/namespaces/tran_purch.rb +11 -0
- data/lib/netsuite/namespaces/tran_sales.rb +11 -0
- data/lib/netsuite/passports/token.rb +55 -0
- data/lib/netsuite/passports/user.rb +25 -0
- data/lib/netsuite/records/account.rb +30 -0
- data/lib/netsuite/records/accounting_period.rb +25 -0
- data/lib/netsuite/records/address.rb +46 -0
- data/lib/netsuite/records/assembly_build.rb +39 -0
- data/lib/netsuite/records/assembly_component.rb +26 -0
- data/lib/netsuite/records/assembly_component_list.rb +12 -0
- data/lib/netsuite/records/assembly_item.rb +66 -0
- data/lib/netsuite/records/assembly_unbuild.rb +37 -0
- data/lib/netsuite/records/base_ref_list.rb +17 -0
- data/lib/netsuite/records/bill_address.rb +17 -0
- data/lib/netsuite/records/billing_schedule.rb +33 -0
- data/lib/netsuite/records/billing_schedule_milestone.rb +28 -0
- data/lib/netsuite/records/billing_schedule_milestone_list.rb +14 -0
- data/lib/netsuite/records/billing_schedule_recurrence.rb +28 -0
- data/lib/netsuite/records/billing_schedule_recurrence_list.rb +14 -0
- data/lib/netsuite/records/bin.rb +30 -0
- data/lib/netsuite/records/bin_number.rb +18 -0
- data/lib/netsuite/records/bin_number_list.rb +11 -0
- data/lib/netsuite/records/bin_transfer.rb +38 -0
- data/lib/netsuite/records/bin_transfer_inventory.rb +20 -0
- data/lib/netsuite/records/bin_transfer_inventory_list.rb +10 -0
- data/lib/netsuite/records/campaign.rb +28 -0
- data/lib/netsuite/records/cash_refund.rb +135 -0
- data/lib/netsuite/records/cash_refund_item.rb +32 -0
- data/lib/netsuite/records/cash_refund_item_list.rb +13 -0
- data/lib/netsuite/records/cash_sale.rb +51 -0
- data/lib/netsuite/records/cash_sale_item.rb +40 -0
- data/lib/netsuite/records/cash_sale_item_list.rb +13 -0
- data/lib/netsuite/records/classification.rb +30 -0
- data/lib/netsuite/records/contact.rb +44 -0
- data/lib/netsuite/records/contact_access_roles.rb +23 -0
- data/lib/netsuite/records/contact_access_roles_list.rb +9 -0
- data/lib/netsuite/records/contact_addressbook.rb +64 -0
- data/lib/netsuite/records/contact_addressbook_list.rb +11 -0
- data/lib/netsuite/records/contact_list.rb +49 -0
- data/lib/netsuite/records/contact_role.rb +23 -0
- data/lib/netsuite/records/cost_category.rb +28 -0
- data/lib/netsuite/records/credit_memo.rb +59 -0
- data/lib/netsuite/records/credit_memo_apply.rb +16 -0
- data/lib/netsuite/records/credit_memo_apply_list.rb +15 -0
- data/lib/netsuite/records/credit_memo_item.rb +34 -0
- data/lib/netsuite/records/credit_memo_item_list.rb +11 -0
- data/lib/netsuite/records/currency.rb +30 -0
- data/lib/netsuite/records/currency_rate.rb +34 -0
- data/lib/netsuite/records/custom_field.rb +23 -0
- data/lib/netsuite/records/custom_field_list.rb +186 -0
- data/lib/netsuite/records/custom_list.rb +27 -0
- data/lib/netsuite/records/custom_list_custom_value.rb +22 -0
- data/lib/netsuite/records/custom_list_custom_value_list.rb +13 -0
- data/lib/netsuite/records/custom_record.rb +56 -0
- data/lib/netsuite/records/custom_record_ref.rb +50 -0
- data/lib/netsuite/records/custom_record_type.rb +30 -0
- data/lib/netsuite/records/customer.rb +265 -0
- data/lib/netsuite/records/customer_addressbook.rb +64 -0
- data/lib/netsuite/records/customer_addressbook_list.rb +11 -0
- data/lib/netsuite/records/customer_category.rb +26 -0
- data/lib/netsuite/records/customer_credit_cards.rb +36 -0
- data/lib/netsuite/records/customer_credit_cards_list.rb +10 -0
- data/lib/netsuite/records/customer_currency.rb +28 -0
- data/lib/netsuite/records/customer_currency_list.rb +9 -0
- data/lib/netsuite/records/customer_deposit.rb +47 -0
- data/lib/netsuite/records/customer_deposit_apply.rb +17 -0
- data/lib/netsuite/records/customer_deposit_apply_list.rb +12 -0
- data/lib/netsuite/records/customer_partner.rb +24 -0
- data/lib/netsuite/records/customer_partners_list.rb +9 -0
- data/lib/netsuite/records/customer_payment.rb +56 -0
- data/lib/netsuite/records/customer_payment_apply.rb +17 -0
- data/lib/netsuite/records/customer_payment_apply_list.rb +12 -0
- data/lib/netsuite/records/customer_payment_credit.rb +17 -0
- data/lib/netsuite/records/customer_payment_credit_list.rb +12 -0
- data/lib/netsuite/records/customer_refund.rb +52 -0
- data/lib/netsuite/records/customer_refund_apply.rb +16 -0
- data/lib/netsuite/records/customer_refund_apply_list.rb +12 -0
- data/lib/netsuite/records/customer_refund_deposit.rb +16 -0
- data/lib/netsuite/records/customer_refund_deposit_list.rb +11 -0
- data/lib/netsuite/records/customer_sales_team.rb +24 -0
- data/lib/netsuite/records/customer_sales_team_list.rb +9 -0
- data/lib/netsuite/records/customer_status.rb +29 -0
- data/lib/netsuite/records/department.rb +27 -0
- data/lib/netsuite/records/deposit.rb +40 -0
- data/lib/netsuite/records/deposit_application.rb +64 -0
- data/lib/netsuite/records/deposit_cash_back.rb +42 -0
- data/lib/netsuite/records/deposit_cash_back_list.rb +9 -0
- data/lib/netsuite/records/deposit_other.rb +35 -0
- data/lib/netsuite/records/deposit_other_list.rb +9 -0
- data/lib/netsuite/records/deposit_payment.rb +48 -0
- data/lib/netsuite/records/deposit_payment_list.rb +14 -0
- data/lib/netsuite/records/description_item.rb +34 -0
- data/lib/netsuite/records/discount_item.rb +37 -0
- data/lib/netsuite/records/duration.rb +15 -0
- data/lib/netsuite/records/employee.rb +42 -0
- data/lib/netsuite/records/entity_custom_field.rb +53 -0
- data/lib/netsuite/records/estimate.rb +122 -0
- data/lib/netsuite/records/estimate_item.rb +47 -0
- data/lib/netsuite/records/estimate_item_list.rb +11 -0
- data/lib/netsuite/records/file.rb +31 -0
- data/lib/netsuite/records/folder.rb +26 -0
- data/lib/netsuite/records/gift_cert_redemption.rb +22 -0
- data/lib/netsuite/records/gift_cert_redemption_list.rb +11 -0
- data/lib/netsuite/records/gift_certificate.rb +30 -0
- data/lib/netsuite/records/gift_certificate_item.rb +84 -0
- data/lib/netsuite/records/inbound_shipment.rb +32 -0
- data/lib/netsuite/records/inbound_shipment_item.rb +39 -0
- data/lib/netsuite/records/inbound_shipment_item_list.rb +11 -0
- data/lib/netsuite/records/inter_company_journal_entry.rb +48 -0
- data/lib/netsuite/records/inter_company_journal_entry_line.rb +28 -0
- data/lib/netsuite/records/inter_company_journal_entry_line_list.rb +12 -0
- data/lib/netsuite/records/inventory_adjustment.rb +30 -0
- data/lib/netsuite/records/inventory_adjustment_inventory.rb +21 -0
- data/lib/netsuite/records/inventory_adjustment_inventory_list.rb +10 -0
- data/lib/netsuite/records/inventory_assignment.rb +24 -0
- data/lib/netsuite/records/inventory_assignment_list.rb +35 -0
- data/lib/netsuite/records/inventory_detail.rb +18 -0
- data/lib/netsuite/records/inventory_item.rb +341 -0
- data/lib/netsuite/records/inventory_number.rb +34 -0
- data/lib/netsuite/records/inventory_number_locations.rb +16 -0
- data/lib/netsuite/records/inventory_number_locations_list.rb +10 -0
- data/lib/netsuite/records/inventory_transfer.rb +30 -0
- data/lib/netsuite/records/inventory_transfer_inventory.rb +21 -0
- data/lib/netsuite/records/inventory_transfer_inventory_list.rb +10 -0
- data/lib/netsuite/records/invoice.rb +167 -0
- data/lib/netsuite/records/invoice_item.rb +46 -0
- data/lib/netsuite/records/invoice_item_list.rb +15 -0
- data/lib/netsuite/records/item_availability.rb +45 -0
- data/lib/netsuite/records/item_fulfillment.rb +62 -0
- data/lib/netsuite/records/item_fulfillment_item.rb +45 -0
- data/lib/netsuite/records/item_fulfillment_item_list.rb +14 -0
- data/lib/netsuite/records/item_fulfillment_package.rb +24 -0
- data/lib/netsuite/records/item_fulfillment_package_fed_ex.rb +28 -0
- data/lib/netsuite/records/item_fulfillment_package_fed_ex_list.rb +32 -0
- data/lib/netsuite/records/item_fulfillment_package_list.rb +37 -0
- data/lib/netsuite/records/item_fulfillment_package_ups.rb +27 -0
- data/lib/netsuite/records/item_fulfillment_package_ups_list.rb +32 -0
- data/lib/netsuite/records/item_fulfillment_package_usps.rb +26 -0
- data/lib/netsuite/records/item_fulfillment_package_usps_list.rb +32 -0
- data/lib/netsuite/records/item_group.rb +37 -0
- data/lib/netsuite/records/item_member.rb +26 -0
- data/lib/netsuite/records/item_member_list.rb +12 -0
- data/lib/netsuite/records/item_option_custom_field.rb +52 -0
- data/lib/netsuite/records/item_receipt.rb +46 -0
- data/lib/netsuite/records/item_receipt_item.rb +43 -0
- data/lib/netsuite/records/item_receipt_item_list.rb +11 -0
- data/lib/netsuite/records/item_vendor.rb +24 -0
- data/lib/netsuite/records/item_vendor_list.rb +11 -0
- data/lib/netsuite/records/job.rb +41 -0
- data/lib/netsuite/records/job_status.rb +25 -0
- data/lib/netsuite/records/journal_entry.rb +48 -0
- data/lib/netsuite/records/journal_entry_line.rb +27 -0
- data/lib/netsuite/records/journal_entry_line_list.rb +12 -0
- data/lib/netsuite/records/kit_item.rb +71 -0
- data/lib/netsuite/records/location.rb +40 -0
- data/lib/netsuite/records/locations_list.rb +15 -0
- data/lib/netsuite/records/lot_numbered_assembly_item.rb +64 -0
- data/lib/netsuite/records/lot_numbered_inventory_item.rb +260 -0
- data/lib/netsuite/records/matrix_option_list.rb +71 -0
- data/lib/netsuite/records/member_list.rb +10 -0
- data/lib/netsuite/records/message.rb +30 -0
- data/lib/netsuite/records/non_inventory_purchase_item.rb +52 -0
- data/lib/netsuite/records/non_inventory_resale_item.rb +189 -0
- data/lib/netsuite/records/non_inventory_sale_item.rb +165 -0
- data/lib/netsuite/records/note.rb +33 -0
- data/lib/netsuite/records/note_type.rb +27 -0
- data/lib/netsuite/records/null_field_list.rb +15 -0
- data/lib/netsuite/records/opportunity.rb +45 -0
- data/lib/netsuite/records/opportunity_item.rb +41 -0
- data/lib/netsuite/records/opportunity_item_list.rb +9 -0
- data/lib/netsuite/records/other_charge_sale_item.rb +73 -0
- data/lib/netsuite/records/partner.rb +35 -0
- data/lib/netsuite/records/payment_item.rb +36 -0
- data/lib/netsuite/records/payment_method.rb +28 -0
- data/lib/netsuite/records/payroll_item.rb +36 -0
- data/lib/netsuite/records/phone_call.rb +29 -0
- data/lib/netsuite/records/price.rb +17 -0
- data/lib/netsuite/records/price_level.rb +26 -0
- data/lib/netsuite/records/price_list.rb +9 -0
- data/lib/netsuite/records/pricing.rb +20 -0
- data/lib/netsuite/records/pricing_matrix.rb +11 -0
- data/lib/netsuite/records/promotion_code.rb +38 -0
- data/lib/netsuite/records/promotions.rb +26 -0
- data/lib/netsuite/records/promotions_list.rb +9 -0
- data/lib/netsuite/records/purchase_order.rb +52 -0
- data/lib/netsuite/records/purchase_order_item.rb +42 -0
- data/lib/netsuite/records/purchase_order_item_list.rb +11 -0
- data/lib/netsuite/records/record_ref.rb +38 -0
- data/lib/netsuite/records/record_ref_list.rb +22 -0
- data/lib/netsuite/records/return_authorization.rb +135 -0
- data/lib/netsuite/records/return_authorization_item.rb +43 -0
- data/lib/netsuite/records/return_authorization_item_list.rb +11 -0
- data/lib/netsuite/records/rev_rec_schedule.rb +32 -0
- data/lib/netsuite/records/rev_rec_template.rb +25 -0
- data/lib/netsuite/records/role_list.rb +24 -0
- data/lib/netsuite/records/roles.rb +17 -0
- data/lib/netsuite/records/sales_order.rb +61 -0
- data/lib/netsuite/records/sales_order_item.rb +49 -0
- data/lib/netsuite/records/sales_order_item_list.rb +11 -0
- data/lib/netsuite/records/sales_order_ship_group_list.rb +11 -0
- data/lib/netsuite/records/sales_role.rb +26 -0
- data/lib/netsuite/records/sales_tax_item.rb +34 -0
- data/lib/netsuite/records/serialized_assembly_item.rb +240 -0
- data/lib/netsuite/records/serialized_inventory_item.rb +248 -0
- data/lib/netsuite/records/serialized_inventory_item_location.rb +36 -0
- data/lib/netsuite/records/serialized_inventory_item_locations_list.rb +10 -0
- data/lib/netsuite/records/serialized_inventory_item_numbers.rb +15 -0
- data/lib/netsuite/records/serialized_inventory_item_numbers_list.rb +10 -0
- data/lib/netsuite/records/service_resale_item.rb +154 -0
- data/lib/netsuite/records/service_sale_item.rb +50 -0
- data/lib/netsuite/records/ship_address.rb +17 -0
- data/lib/netsuite/records/site_category.rb +33 -0
- data/lib/netsuite/records/subscription.rb +18 -0
- data/lib/netsuite/records/subscriptions_list.rb +10 -0
- data/lib/netsuite/records/subsidiary.rb +38 -0
- data/lib/netsuite/records/subtotal_item.rb +34 -0
- data/lib/netsuite/records/support_case.rb +32 -0
- data/lib/netsuite/records/support_case_type.rb +26 -0
- data/lib/netsuite/records/task.rb +31 -0
- data/lib/netsuite/records/tax_group.rb +35 -0
- data/lib/netsuite/records/tax_type.rb +22 -0
- data/lib/netsuite/records/term.rb +27 -0
- data/lib/netsuite/records/time_bill.rb +32 -0
- data/lib/netsuite/records/transaction_body_custom_field.rb +61 -0
- data/lib/netsuite/records/transaction_column_custom_field.rb +59 -0
- data/lib/netsuite/records/transaction_ship_group.rb +40 -0
- data/lib/netsuite/records/transfer_order.rb +45 -0
- data/lib/netsuite/records/transfer_order_item.rb +43 -0
- data/lib/netsuite/records/transfer_order_item_list.rb +11 -0
- data/lib/netsuite/records/translation.rb +17 -0
- data/lib/netsuite/records/translation_list.rb +11 -0
- data/lib/netsuite/records/units_type.rb +25 -0
- data/lib/netsuite/records/units_type_uom.rb +20 -0
- data/lib/netsuite/records/units_type_uom_list.rb +12 -0
- data/lib/netsuite/records/vendor.rb +46 -0
- data/lib/netsuite/records/vendor_bill.rb +53 -0
- data/lib/netsuite/records/vendor_bill_expense.rb +40 -0
- data/lib/netsuite/records/vendor_bill_expense_list.rb +13 -0
- data/lib/netsuite/records/vendor_bill_item.rb +46 -0
- data/lib/netsuite/records/vendor_bill_item_list.rb +12 -0
- data/lib/netsuite/records/vendor_category.rb +26 -0
- data/lib/netsuite/records/vendor_credit.rb +54 -0
- data/lib/netsuite/records/vendor_credit_apply.rb +18 -0
- data/lib/netsuite/records/vendor_credit_apply_list.rb +12 -0
- data/lib/netsuite/records/vendor_credit_expense.rb +31 -0
- data/lib/netsuite/records/vendor_credit_expense_list.rb +12 -0
- data/lib/netsuite/records/vendor_credit_item.rb +34 -0
- data/lib/netsuite/records/vendor_credit_item_list.rb +12 -0
- data/lib/netsuite/records/vendor_currency.rb +26 -0
- data/lib/netsuite/records/vendor_currency_list.rb +9 -0
- data/lib/netsuite/records/vendor_payment.rb +52 -0
- data/lib/netsuite/records/vendor_payment_apply.rb +16 -0
- data/lib/netsuite/records/vendor_payment_apply_list.rb +12 -0
- data/lib/netsuite/records/vendor_return_authorization.rb +30 -0
- data/lib/netsuite/records/vendor_return_authorization_item.rb +23 -0
- data/lib/netsuite/records/vendor_return_authorization_item_list.rb +12 -0
- data/lib/netsuite/records/work_order.rb +45 -0
- data/lib/netsuite/records/work_order_item.rb +30 -0
- data/lib/netsuite/records/work_order_item_list.rb +11 -0
- data/lib/netsuite/response.rb +20 -0
- data/lib/netsuite/rest/utilities/request.rb +62 -0
- data/lib/netsuite/rest/utilities/roles.rb +47 -0
- data/lib/netsuite/support/actions.rb +74 -0
- data/lib/netsuite/support/attributes.rb +22 -0
- data/lib/netsuite/support/country.rb +289 -0
- data/lib/netsuite/support/fields.rb +86 -0
- data/lib/netsuite/support/record_refs.rb +30 -0
- data/lib/netsuite/support/records.rb +89 -0
- data/lib/netsuite/support/requests.rb +56 -0
- data/lib/netsuite/support/search_result.rb +150 -0
- data/lib/netsuite/support/sublist.rb +71 -0
- data/lib/netsuite/utilities/data_center.rb +53 -0
- data/lib/netsuite/utilities/strings.rb +15 -0
- data/lib/netsuite/utilities.rb +324 -0
- data/lib/netsuite/version.rb +3 -0
- data/lib/netsuite.rb +348 -0
- data/netsuite.gemspec +30 -0
- data/spec/integration/soap_http_spec.rb +76 -0
- data/spec/netsuite/actions/add_spec.rb +155 -0
- data/spec/netsuite/actions/async_add_list_spec.rb +123 -0
- data/spec/netsuite/actions/async_delete_list_spec.rb +60 -0
- data/spec/netsuite/actions/async_get_list_spec.rb +78 -0
- data/spec/netsuite/actions/async_initialize_list_spec.rb +106 -0
- data/spec/netsuite/actions/async_lifecycle_spec.rb +51 -0
- data/spec/netsuite/actions/async_response_spec.rb +187 -0
- data/spec/netsuite/actions/async_search_spec.rb +27 -0
- data/spec/netsuite/actions/async_update_list_spec.rb +80 -0
- data/spec/netsuite/actions/async_upsert_list_spec.rb +157 -0
- data/spec/netsuite/actions/attach_file_spec.rb +59 -0
- data/spec/netsuite/actions/check_async_status_spec.rb +29 -0
- data/spec/netsuite/actions/delete_list_spec.rb +86 -0
- data/spec/netsuite/actions/delete_spec.rb +93 -0
- data/spec/netsuite/actions/get_all_spec.rb +100 -0
- data/spec/netsuite/actions/get_async_result_spec.rb +78 -0
- data/spec/netsuite/actions/get_deleted_spec.rb +60 -0
- data/spec/netsuite/actions/get_list_spec.rb +157 -0
- data/spec/netsuite/actions/get_select_value_spec.rb +43 -0
- data/spec/netsuite/actions/get_spec.rb +72 -0
- data/spec/netsuite/actions/initialize_spec.rb +34 -0
- data/spec/netsuite/actions/search_spec.rb +387 -0
- data/spec/netsuite/actions/update_list_spec.rb +107 -0
- data/spec/netsuite/actions/update_spec.rb +133 -0
- data/spec/netsuite/actions/upsert_list_spec.rb +112 -0
- data/spec/netsuite/actions/upsert_spec.rb +117 -0
- data/spec/netsuite/configuration_spec.rb +661 -0
- data/spec/netsuite/records/account_spec.rb +107 -0
- data/spec/netsuite/records/accounting_period_spec.rb +138 -0
- data/spec/netsuite/records/address_spec.rb +139 -0
- data/spec/netsuite/records/assembly_item_spec.rb +64 -0
- data/spec/netsuite/records/basic_record_spec.rb +128 -0
- data/spec/netsuite/records/bill_address_spec.rb +52 -0
- data/spec/netsuite/records/billing_schedule_milestone_list_spec.rb +24 -0
- data/spec/netsuite/records/billing_schedule_milestone_spec.rb +51 -0
- data/spec/netsuite/records/billing_schedule_recurrence_list_spec.rb +24 -0
- data/spec/netsuite/records/billing_schedule_recurrence_spec.rb +49 -0
- data/spec/netsuite/records/billing_schedule_spec.rb +164 -0
- data/spec/netsuite/records/bin_number_spec.rb +23 -0
- data/spec/netsuite/records/campaign_spec.rb +43 -0
- data/spec/netsuite/records/cash_refund_item_list_spec.rb +27 -0
- data/spec/netsuite/records/cash_refund_item_spec.rb +27 -0
- data/spec/netsuite/records/cash_refund_spec.rb +152 -0
- data/spec/netsuite/records/cash_sale_item_list_spec.rb +27 -0
- data/spec/netsuite/records/cash_sale_item_spec.rb +23 -0
- data/spec/netsuite/records/cash_sale_spec.rb +34 -0
- data/spec/netsuite/records/classification_spec.rb +77 -0
- data/spec/netsuite/records/cost_category_spec.rb +105 -0
- data/spec/netsuite/records/credit_memo_apply_list_spec.rb +27 -0
- data/spec/netsuite/records/credit_memo_apply_spec.rb +14 -0
- data/spec/netsuite/records/credit_memo_item_list_spec.rb +26 -0
- data/spec/netsuite/records/credit_memo_item_spec.rb +29 -0
- data/spec/netsuite/records/credit_memo_spec.rb +213 -0
- data/spec/netsuite/records/currency_rate_spec.rb +45 -0
- data/spec/netsuite/records/custom_field_list_spec.rb +276 -0
- data/spec/netsuite/records/custom_list_spec.rb +21 -0
- data/spec/netsuite/records/custom_record_spec.rb +125 -0
- data/spec/netsuite/records/custom_record_type_spec.rb +114 -0
- data/spec/netsuite/records/customer_addressbook_list_spec.rb +41 -0
- data/spec/netsuite/records/customer_addressbook_spec.rb +105 -0
- data/spec/netsuite/records/customer_credit_cards_list_spec.rb +23 -0
- data/spec/netsuite/records/customer_payment_apply_list_spec.rb +25 -0
- data/spec/netsuite/records/customer_payment_credit_list_spec.rb +26 -0
- data/spec/netsuite/records/customer_payment_spec.rb +168 -0
- data/spec/netsuite/records/customer_refund_apply_list_spec.rb +25 -0
- data/spec/netsuite/records/customer_refund_apply_spec.rb +14 -0
- data/spec/netsuite/records/customer_refund_deposit_list_spec.rb +25 -0
- data/spec/netsuite/records/customer_refund_deposit_spec.rb +14 -0
- data/spec/netsuite/records/customer_refund_spec.rb +205 -0
- data/spec/netsuite/records/customer_sales_team_list_spec.rb +41 -0
- data/spec/netsuite/records/customer_spec.rb +561 -0
- data/spec/netsuite/records/department_spec.rb +103 -0
- data/spec/netsuite/records/deposit_spec.rb +165 -0
- data/spec/netsuite/records/discount_item_spec.rb +125 -0
- data/spec/netsuite/records/duration_spec.rb +14 -0
- data/spec/netsuite/records/employee_spec.rb +148 -0
- data/spec/netsuite/records/entity_custom_field_spec.rb +34 -0
- data/spec/netsuite/records/estimate_item_list_spec.rb +26 -0
- data/spec/netsuite/records/estimate_item_spec.rb +35 -0
- data/spec/netsuite/records/estimate_spec.rb +274 -0
- data/spec/netsuite/records/file_spec.rb +11 -0
- data/spec/netsuite/records/folder_spec.rb +33 -0
- data/spec/netsuite/records/gift_cert_redemption_list_spec.rb +26 -0
- data/spec/netsuite/records/gift_cert_redemption_spec.rb +21 -0
- data/spec/netsuite/records/inter_company_journal_entry_line_list_spec.rb +26 -0
- data/spec/netsuite/records/inter_company_journal_entry_line_spec.rb +60 -0
- data/spec/netsuite/records/inter_company_journal_entry_spec.rb +156 -0
- data/spec/netsuite/records/inventory_assignment_list_spec.rb +59 -0
- data/spec/netsuite/records/inventory_assignment_spec.rb +21 -0
- data/spec/netsuite/records/inventory_detail_spec.rb +13 -0
- data/spec/netsuite/records/inventory_item_spec.rb +532 -0
- data/spec/netsuite/records/inventory_transfer_spec.rb +79 -0
- data/spec/netsuite/records/invoice_item_list_spec.rb +24 -0
- data/spec/netsuite/records/invoice_item_spec.rb +79 -0
- data/spec/netsuite/records/invoice_spec.rb +494 -0
- data/spec/netsuite/records/item_availability_spec.rb +59 -0
- data/spec/netsuite/records/item_fulfillment_package_fed_ex_list_spec.rb +27 -0
- data/spec/netsuite/records/item_fulfillment_package_list_spec.rb +27 -0
- data/spec/netsuite/records/item_fulfillment_package_ups_list_spec.rb +27 -0
- data/spec/netsuite/records/item_fulfillment_package_usps_list_spec.rb +27 -0
- data/spec/netsuite/records/item_fulfillment_spec.rb +49 -0
- data/spec/netsuite/records/item_group_spec.rb +117 -0
- data/spec/netsuite/records/item_member_list_spec.rb +26 -0
- data/spec/netsuite/records/item_option_custom_field_spec.rb +27 -0
- data/spec/netsuite/records/item_vendor_list_spec.rb +27 -0
- data/spec/netsuite/records/item_vendor_spec.rb +27 -0
- data/spec/netsuite/records/job_spec.rb +201 -0
- data/spec/netsuite/records/journal_entry_line_list_spec.rb +26 -0
- data/spec/netsuite/records/journal_entry_line_spec.rb +59 -0
- data/spec/netsuite/records/journal_entry_spec.rb +156 -0
- data/spec/netsuite/records/kit_item_spec.rb +117 -0
- data/spec/netsuite/records/location_spec.rb +51 -0
- data/spec/netsuite/records/lot_numbered_inventory_item_spec.rb +247 -0
- data/spec/netsuite/records/matrix_option_list_spec.rb +61 -0
- data/spec/netsuite/records/message_spec.rb +49 -0
- data/spec/netsuite/records/non_inventory_resale_item_spec.rb +300 -0
- data/spec/netsuite/records/non_inventory_sale_item_spec.rb +278 -0
- data/spec/netsuite/records/note_spec.rb +134 -0
- data/spec/netsuite/records/note_type_spec.rb +88 -0
- data/spec/netsuite/records/null_field_list_spec.rb +30 -0
- data/spec/netsuite/records/partner_spec.rb +143 -0
- data/spec/netsuite/records/payment_item_spec.rb +117 -0
- data/spec/netsuite/records/payment_method_spec.rb +49 -0
- data/spec/netsuite/records/phone_call_spec.rb +17 -0
- data/spec/netsuite/records/pomo_code_spec.rb +40 -0
- data/spec/netsuite/records/price_level_spec.rb +16 -0
- data/spec/netsuite/records/pricing_matrix_spec.rb +27 -0
- data/spec/netsuite/records/record_ref_spec.rb +87 -0
- data/spec/netsuite/records/return_authorization_item_list_spec.rb +26 -0
- data/spec/netsuite/records/return_authorization_item_spec.rb +31 -0
- data/spec/netsuite/records/return_authorization_spec.rb +62 -0
- data/spec/netsuite/records/rev_rec_template_spec.rb +39 -0
- data/spec/netsuite/records/sales_order_item_list_spec.rb +26 -0
- data/spec/netsuite/records/sales_order_item_spec.rb +36 -0
- data/spec/netsuite/records/sales_order_spec.rb +250 -0
- data/spec/netsuite/records/sales_tax_item_spec.rb +26 -0
- data/spec/netsuite/records/service_resale_item_spec.rb +239 -0
- data/spec/netsuite/records/service_sale_item_spec.rb +135 -0
- data/spec/netsuite/records/ship_address_spec.rb +36 -0
- data/spec/netsuite/records/site_category_spec.rb +51 -0
- data/spec/netsuite/records/subscription_spec.rb +37 -0
- data/spec/netsuite/records/subscriptions_list_spec.rb +19 -0
- data/spec/netsuite/records/subsidiary_spec.rb +25 -0
- data/spec/netsuite/records/support_case_spec.rb +157 -0
- data/spec/netsuite/records/support_case_type_spec.rb +22 -0
- data/spec/netsuite/records/tax_type_spec.rb +11 -0
- data/spec/netsuite/records/term_spec.rb +96 -0
- data/spec/netsuite/records/transaction_body_custom_field_spec.rb +32 -0
- data/spec/netsuite/records/transaction_column_custom_field_spec.rb +32 -0
- data/spec/netsuite/records/translation_list_spec.rb +34 -0
- data/spec/netsuite/records/translation_spec.rb +28 -0
- data/spec/netsuite/records/units_type_spec.rb +33 -0
- data/spec/netsuite/records/units_type_uom_list_spec.rb +23 -0
- data/spec/netsuite/records/units_type_uom_spec.rb +14 -0
- data/spec/netsuite/records/vendor_bill_expense_list_spec.rb +36 -0
- data/spec/netsuite/records/vendor_bill_expense_spec.rb +72 -0
- data/spec/netsuite/records/vendor_bill_item_list_spec.rb +36 -0
- data/spec/netsuite/records/vendor_bill_item_spec.rb +118 -0
- data/spec/netsuite/records/vendor_bill_spec.rb +187 -0
- data/spec/netsuite/records/vendor_credit_spec.rb +29 -0
- data/spec/netsuite/records/vendor_payment_apply_list_spec.rb +25 -0
- data/spec/netsuite/records/vendor_payment_apply_spec.rb +15 -0
- data/spec/netsuite/records/vendor_payment_spec.rb +164 -0
- data/spec/netsuite/records/vendor_spec.rb +145 -0
- data/spec/netsuite/records/work_order_item_list_spec.rb +26 -0
- data/spec/netsuite/records/work_order_item_spec.rb +45 -0
- data/spec/netsuite/records/work_order_spec.rb +92 -0
- data/spec/netsuite/response_spec.rb +34 -0
- data/spec/netsuite/support/fields_spec.rb +107 -0
- data/spec/netsuite/support/record_refs_spec.rb +14 -0
- data/spec/netsuite/support/records_spec.rb +60 -0
- data/spec/netsuite/support/refresh_spec.rb +28 -0
- data/spec/netsuite/support/requests_spec.rb +38 -0
- data/spec/netsuite/support/search_result_spec.rb +53 -0
- data/spec/netsuite/support/sublist_spec.rb +42 -0
- data/spec/netsuite/utilities/data_center_spec.rb +110 -0
- data/spec/netsuite/utilities/request_spec.rb +29 -0
- data/spec/netsuite/utilities/roles_spec.rb +145 -0
- data/spec/netsuite/utilities_spec.rb +140 -0
- data/spec/netsuite_spec.rb +41 -0
- data/spec/spec_helper.rb +50 -0
- data/spec/support/configuration.rb +23 -0
- data/spec/support/field_matcher.rb +21 -0
- data/spec/support/fixtures/add/add_customer.xml +16 -0
- data/spec/support/fixtures/add/add_file.xml +20 -0
- data/spec/support/fixtures/add/add_invoice.xml +20 -0
- data/spec/support/fixtures/add/add_invoice_error.xml +19 -0
- data/spec/support/fixtures/add/add_invoice_multiple_errors.xml +24 -0
- data/spec/support/fixtures/async_add_list/async_add_list_pending.xml +18 -0
- data/spec/support/fixtures/async_delete_list/async_delete_list_pending.xml +18 -0
- data/spec/support/fixtures/async_get_list/async_get_list_pending.xml +18 -0
- data/spec/support/fixtures/async_initialize_list/async_initialize_list_pending.xml +18 -0
- data/spec/support/fixtures/async_search/async_search_pending.xml +18 -0
- data/spec/support/fixtures/async_update_list/async_update_list_pending.xml +18 -0
- data/spec/support/fixtures/async_upsert_list/async_upsert_list_customers.xml +16 -0
- data/spec/support/fixtures/async_upsert_list/async_upsert_list_one_customer.xml +16 -0
- data/spec/support/fixtures/async_upsert_list/async_upsert_list_with_errors.xml +21 -0
- data/spec/support/fixtures/attach/attach_file_to_sales_order.xml +16 -0
- data/spec/support/fixtures/attach/attach_file_to_sales_order_error.xml +20 -0
- data/spec/support/fixtures/check_async_status/check_async_status_pending.xml +18 -0
- data/spec/support/fixtures/custom_fields/multi_select.xml +47 -0
- data/spec/support/fixtures/delete/delete_customer.xml +16 -0
- data/spec/support/fixtures/delete/delete_customer_error.xml +21 -0
- data/spec/support/fixtures/delete/delete_customer_multiple_errors.xml +25 -0
- data/spec/support/fixtures/delete_list/delete_list_customers.xml +26 -0
- data/spec/support/fixtures/delete_list/delete_list_customers_with_errors.xml +31 -0
- data/spec/support/fixtures/get/get_customer.xml +61 -0
- data/spec/support/fixtures/get/get_invoice.xml +101 -0
- data/spec/support/fixtures/get_all/get_all_currencies.xml +24 -0
- data/spec/support/fixtures/get_all/get_all_error.xml +15 -0
- data/spec/support/fixtures/get_async_result/get_async_result_finished.xml +22 -0
- data/spec/support/fixtures/get_async_result/get_async_result_upsert_list_finished.xml +26 -0
- data/spec/support/fixtures/get_async_result/get_async_result_write_list_multiple.xml +34 -0
- data/spec/support/fixtures/get_deleted/get_deleted_invoices.xml +38 -0
- data/spec/support/fixtures/get_item_availability/get_item_availability.xml +46 -0
- data/spec/support/fixtures/get_list/get_list_customer_error.xml +22 -0
- data/spec/support/fixtures/get_list/get_list_customers.xml +21 -0
- data/spec/support/fixtures/get_list/get_list_customers_multiple.xml +28 -0
- data/spec/support/fixtures/get_select_value/empty_result.xml +22 -0
- data/spec/support/fixtures/get_select_value/item_fulfillment_ship_method.xml +43 -0
- data/spec/support/fixtures/initialize/initialize_invoice_from_customer.xml +69 -0
- data/spec/support/fixtures/login/failure_concurrent_requests.xml +15 -0
- data/spec/support/fixtures/login/failure_invalid_credentials.xml +15 -0
- data/spec/support/fixtures/login/success.xml +35 -0
- data/spec/support/fixtures/search/basic_search_contact.xml +39 -0
- data/spec/support/fixtures/search/saved_search_customer.xml +54 -0
- data/spec/support/fixtures/search/saved_search_item.xml +55 -0
- data/spec/support/fixtures/search/saved_search_joined_custom_customer.xml +101 -0
- data/spec/support/fixtures/search/single_search_result.xml +46 -0
- data/spec/support/fixtures/soap/v2025_2_0/wsdl/netsuite.wsdl +2531 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/activities/scheduling.xsd +603 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/activities/schedulingTypes.xsd +198 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/documents/fileCabinet.xsd +159 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/documents/fileCabinetTypes.xsd +110 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/general/communication.xsd +210 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/general/communicationTypes.xsd +20 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/accounting.xsd +6768 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/accountingTypes.xsd +1043 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/employeeTypes.xsd +344 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/employees.xsd +518 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/marketing.xsd +528 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/marketingTypes.xsd +145 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/relationshipTypes.xsd +190 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/relationships.xsd +1658 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/supplyChain.xsd +282 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/supplyChainTypes.xsd +26 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/support.xsd +534 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/supportTypes.xsd +74 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/website.xsd +99 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/lists/websiteTypes.xsd +2 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/platform/common.xsd +8411 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/platform/commonTypes.xsd +1371 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/platform/core.xsd +1096 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/platform/coreTypes.xsd +877 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/platform/faultTypes.xsd +1446 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/platform/faults.xsd +82 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/platform/messages.xsd +664 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/setup/customization.xsd +1604 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/setup/customizationTypes.xsd +119 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/bank.xsd +212 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/bankTypes.xsd +2 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/customerTypes.xsd +99 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/customers.xsd +1131 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/demandPlanning.xsd +173 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/demandPlanningTypes.xsd +52 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/employeeTypes.xsd +10 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/employees.xsd +723 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/financial.xsd +88 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/financialTypes.xsd +9 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/general.xsd +364 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/inventory.xsd +780 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/inventoryTypes.xsd +49 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/purchaseTypes.xsd +44 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/purchases.xsd +986 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/saleTypes.xsd +754 -0
- data/spec/support/fixtures/soap/v2025_2_0/xsd/transactions/sales.xsd +2025 -0
- data/spec/support/fixtures/update/update_customer.xml +16 -0
- data/spec/support/fixtures/update/update_customer_error.xml +21 -0
- data/spec/support/fixtures/update/update_customer_multiple_errors.xml +25 -0
- data/spec/support/fixtures/update/update_invoice.xml +16 -0
- data/spec/support/fixtures/update_list/update_list_items.xml +22 -0
- data/spec/support/fixtures/update_list/update_list_one_item.xml +18 -0
- data/spec/support/fixtures/update_list/update_list_with_errors.xml +32 -0
- data/spec/support/fixtures/upsert/upsert_customer.xml +16 -0
- data/spec/support/fixtures/upsert/upsert_invoice.xml +16 -0
- data/spec/support/fixtures/upsert/upsert_invoice_error.xml +20 -0
- data/spec/support/fixtures/upsert/upsert_invoice_multiple_errors.xml +24 -0
- data/spec/support/fixtures/upsert_list/upsert_list_customers.xml +21 -0
- data/spec/support/fixtures/upsert_list/upsert_list_one_customer.xml +17 -0
- data/spec/support/fixtures/upsert_list/upsert_list_with_errors.xml +32 -0
- data/spec/support/read_only_field_matcher.rb +7 -0
- data/spec/support/record_ref_matcher.rb +25 -0
- data/spec/support/savon.rb +5 -0
- data/spec/support/search_only_field_matcher.rb +7 -0
- data/spec/support/webmock_soap_helper.rb +15 -0
- data/workflow.md +368 -0
- metadata +764 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class Invoice
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::RecordRefs
|
|
6
|
+
include Support::Records
|
|
7
|
+
include Support::Actions
|
|
8
|
+
include Namespaces::TranSales
|
|
9
|
+
|
|
10
|
+
# https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/schema/record/invoice.html?mode=package
|
|
11
|
+
|
|
12
|
+
actions :attach_file, :get, :get_deleted, :get_list, :initialize, :add, :update, :delete, :upsert, :upsert_list, :search
|
|
13
|
+
|
|
14
|
+
fields :balance,
|
|
15
|
+
:billing_schedule, :contrib_pct, :created_date, :currency_name,
|
|
16
|
+
:deferred_revenue, :discount_amount, :discount_date, :discount_rate,
|
|
17
|
+
:due_date, :email, :end_date, :est_gross_profit, :est_gross_profit_percent, :exchange_rate,
|
|
18
|
+
:exclude_commission, :exp_cost_disc_amount, :exp_cost_disc_print, :exp_cost_disc_rate, :exp_cost_disc_tax_1_amt,
|
|
19
|
+
:exp_cost_disc_taxable, :exp_cost_discount, :exp_cost_list, :exp_cost_tax_code, :exp_cost_tax_rate_1,
|
|
20
|
+
:exp_cost_tax_rate_2, :fax, :fob, :gift_cert_redemption_list, :handling_tax_1_rate,
|
|
21
|
+
:handling_tax_2_rate, :handling_tax_code, :is_taxable, :item_cost_disc_amount, :item_cost_disc_print,
|
|
22
|
+
:item_cost_disc_rate, :item_cost_disc_tax_1_amt, :item_cost_disc_taxable, :item_cost_discount, :item_cost_list,
|
|
23
|
+
:item_cost_tax_code, :item_cost_tax_rate_1, :item_cost_tax_rate_2, :last_modified_date,
|
|
24
|
+
:linked_tracking_numbers, :memo, :message, :message_sel, :on_credit_hold, :opportunity,
|
|
25
|
+
:other_ref_num, :partners_list, :rev_rec_end_date,
|
|
26
|
+
:rev_rec_on_rev_commitment, :rev_rec_schedule, :rev_rec_start_date, :revenue_status, :sales_effective_date,
|
|
27
|
+
:sales_group, :sales_team_list, :ship_date, :ship_group_list,
|
|
28
|
+
:shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :source, :start_date,
|
|
29
|
+
:status, :sync_partner_teams, :sync_sales_teams, :tax_2_total,
|
|
30
|
+
:tax_total, :time_disc_amount, :time_disc_print, :time_disc_rate, :time_disc_tax_1_amt, :time_disc_taxable,
|
|
31
|
+
:time_discount, :time_list, :time_tax_code, :time_tax_rate_1, :time_tax_rate_2, :to_be_emailed, :to_be_faxed,
|
|
32
|
+
:to_be_printed, :total_cost_estimate, :tracking_numbers, :tran_date, :tran_id, :tran_is_vsoe_bundle,
|
|
33
|
+
:vat_reg_num, :vsoe_auto_calc, :tax_rate
|
|
34
|
+
|
|
35
|
+
field :transaction_bill_address, BillAddress
|
|
36
|
+
field :transaction_ship_address, ShipAddress
|
|
37
|
+
field :item_list, InvoiceItemList
|
|
38
|
+
field :custom_field_list, CustomFieldList
|
|
39
|
+
field :shipping_address, Address
|
|
40
|
+
field :billing_address, Address
|
|
41
|
+
field :null_field_list, NullFieldList
|
|
42
|
+
|
|
43
|
+
read_only_fields :sub_total, :discount_total, :total, :recognized_revenue, :amount_remaining, :amount_paid,
|
|
44
|
+
:alt_shipping_cost, :gift_cert_applied, :handling_cost, :alt_handling_cost
|
|
45
|
+
|
|
46
|
+
# https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_2/schema/search/transactionsearchrowbasic.html?mode=package
|
|
47
|
+
search_only_fields :abbrev, :account_type, :acct_corp_card_exp,
|
|
48
|
+
:actual_production_end_date, :actual_production_start_date,
|
|
49
|
+
:actual_ship_date, :alt_sales_amount, :alt_sales_net_amount, :amount,
|
|
50
|
+
:amount_unbilled, :applied_to_foreign_amount,
|
|
51
|
+
:applied_to_is_fx_variance, :applied_to_link_amount,
|
|
52
|
+
:applied_to_link_type, :applied_to_transaction,
|
|
53
|
+
:applying_foreign_amount, :applying_is_fx_variance,
|
|
54
|
+
:applying_link_amount, :applying_link_type, :applying_transaction,
|
|
55
|
+
:auth_code, :auto_calculate_lag, :avs_street_match, :avs_zip_match,
|
|
56
|
+
:billable, :bill_address, :bill_address1, :bill_address2,
|
|
57
|
+
:bill_address3, :bill_addressee, :bill_attention, :bill_city,
|
|
58
|
+
:bill_country, :bill_country_code, :billed_date, :billing_amount,
|
|
59
|
+
:billing_transaction, :bill_phone, :bill_state, :bill_variance_status,
|
|
60
|
+
:bill_zip, :bin_number, :bin_number_quantity, :bom_quantity,
|
|
61
|
+
:build_entire_assembly, :build_variance, :built,
|
|
62
|
+
:can_have_stackable_promotions, :catch_up_period, :cc_customer_code,
|
|
63
|
+
:cc_exp_date, :cc_holder_name, :cc_number, :cc_street, :cc_zip_code,
|
|
64
|
+
:cleared, :closed, :close_date, :cogs_amount,
|
|
65
|
+
:commission_effective_date, :commit, :component_yield,
|
|
66
|
+
:confirmation_number, :contribution, :contribution_primary,
|
|
67
|
+
:cost_component_amount, :cost_component_category, :cost_component_item,
|
|
68
|
+
:cost_component_quantity, :cost_component_standard_cost, :cost_estimate,
|
|
69
|
+
:cost_estimate_rate, :cost_estimate_type, :created_by, :credit_amount,
|
|
70
|
+
:csc_match, :custom_gl, :cust_type, :date_created, :days_open,
|
|
71
|
+
:days_overdue, :debit_amount, :defer_rev_rec, :deposit_date,
|
|
72
|
+
:deposit_transaction, :doc_unit, :dr_account, :effective_rate,
|
|
73
|
+
:entity_status, :est_gross_profit_pct, :exclude_from_rate_request,
|
|
74
|
+
:expected_close_date, :expected_receipt_date, :expense_category,
|
|
75
|
+
:expense_date, :firmed, :forecast_type, :fulfilling_transaction,
|
|
76
|
+
:fx_account, :fx_amount, :fx_cost_estimate, :fx_cost_estimate_rate,
|
|
77
|
+
:fx_est_gross_profit, :fx_tran_cost_estimate, :fx_vsoe_allocation,
|
|
78
|
+
:fx_vsoe_amount, :fx_vsoe_price, :gco_availabel_to_charge,
|
|
79
|
+
:gco_available_to_refund, :gco_avs_street_match, :gco_avs_zip_match,
|
|
80
|
+
:gco_buyer_account_age, :gco_buyer_ip, :gco_charge_amount,
|
|
81
|
+
:gco_chargeback_amount, :gco_confirmed_charged_total,
|
|
82
|
+
:gco_confirmed_refunded_total, :gco_creditcard_number, :gco_csc_match,
|
|
83
|
+
:gco_financial_state, :gco_fulfillment_state, :gco_order_id,
|
|
84
|
+
:gco_order_total, :gco_promotion_amount, :gco_promotion_name,
|
|
85
|
+
:gco_refund_amount, :gco_shipping_total, :gco_state_changed_detail,
|
|
86
|
+
:gift_cert, :gross_amount, :include_in_forecast, :incoterm,
|
|
87
|
+
:interco_status, :interco_transaction, :inventory_location,
|
|
88
|
+
:inventory_subsidiary, :in_vsoe_bundle, :is_allocation, :is_backflush,
|
|
89
|
+
:is_gco_chargeback, :is_gco_charge_confirmed,
|
|
90
|
+
:is_gco_payment_guaranteed, :is_gco_refund_confirmed,
|
|
91
|
+
:is_inside_delivery, :is_inside_pickup, :is_intercompany_adjustment,
|
|
92
|
+
:is_in_transit_payment, :is_multi_ship_to, :is_reversal,
|
|
93
|
+
:is_rev_rec_transaction, :is_scrap, :is_ship_address,
|
|
94
|
+
:is_transfer_price_costing, :is_wip, :item, :item_fulfillment_choice,
|
|
95
|
+
:item_revision, :landed_cost_per_line, :line, :line_sequence_number,
|
|
96
|
+
:line_unique_key, :location_auto_assigned, :main_line, :main_name,
|
|
97
|
+
:manufacturing_routing, :match_bill_to_receipt, :memo_main, :memorized,
|
|
98
|
+
:merchant_account, :multi_subsidiary, :net_amount, :net_amount_no_tax,
|
|
99
|
+
:next_bill_date, :no_auto_assign_location, :non_reimbursable,
|
|
100
|
+
:one_time_total, :options, :order_allocation_strategy, :order_priority,
|
|
101
|
+
:originator, :overhead_parent_item,
|
|
102
|
+
:override_installments, :package_count, :paid_amount, :paid_transaction,
|
|
103
|
+
:partner_contribution, :partner_role, :partner_team_member,
|
|
104
|
+
:paying_amount, :paying_transaction, :payment_approved,
|
|
105
|
+
:payment_event_date, :payment_event_hold_reason,
|
|
106
|
+
:payment_event_purchase_card_used, :payment_event_purchase_data_sent,
|
|
107
|
+
:payment_event_result, :payment_event_type, :payment_hold,
|
|
108
|
+
:payment_method, :payment_option, :pay_pal_pending, :pay_pal_status,
|
|
109
|
+
:pay_pal_tran_id, :payroll_batch, :pn_ref_num, :po_rate, :posting,
|
|
110
|
+
:price_level, :print, :probability, :projected_amount, :project_task,
|
|
111
|
+
:purchase_order, :quantity, :quantity_billed, :quantity_committed,
|
|
112
|
+
:quantity_packed, :quantity_picked, :quantity_rev_committed,
|
|
113
|
+
:quantity_ship_recv, :quantity_uom, :rate,
|
|
114
|
+
:realized_gain_posting_transaction, :recur_annually_total,
|
|
115
|
+
:recur_monthly_total, :recur_quarterly_total, :recur_weekly_total,
|
|
116
|
+
:ref_number, :requested_date, :rev_commit_status,
|
|
117
|
+
:rev_committing_transaction, :reversal_date, :reversal_number,
|
|
118
|
+
:rg_account, :rg_amount, :sales_order, :sales_team_member,
|
|
119
|
+
:sales_team_role, :scheduling_method, :serial_number,
|
|
120
|
+
:serial_number_cost, :serial_number_cost_adjustment,
|
|
121
|
+
:serial_number_quantity, :serial_numbers, :ship_address, :ship_address1,
|
|
122
|
+
:ship_address2, :ship_address3, :ship_addressee, :ship_attention,
|
|
123
|
+
:ship_carrier, :ship_city, :ship_complete, :ship_country,
|
|
124
|
+
:ship_country_code, :ship_group, :ship_phone, :shipping_amount,
|
|
125
|
+
:ship_recv_status_line, :ship_state, :ship_to, :ship_zip,
|
|
126
|
+
:signed_amount, :subscription, :subscription_line, :tax_amount,
|
|
127
|
+
:tax_code, :tax_line, :tax_period, :term_in_months, :terms_of_sale,
|
|
128
|
+
:title, :to_subsidiary, :tran_est_gross_profit,
|
|
129
|
+
:tran_fx_est_gross_profit, :transaction_discount,
|
|
130
|
+
:transaction_line_type, :transaction_number, :transfer_location,
|
|
131
|
+
:transfer_order_item_line, :transfer_order_quantity_committed,
|
|
132
|
+
:transfer_order_quantity_packed, :transfer_order_quantity_picked,
|
|
133
|
+
:transfer_order_quantity_received, :transfer_order_quantity_shipped,
|
|
134
|
+
:type, :unit, :unit_cost_override, :vend_type, :visible_to_customer,
|
|
135
|
+
:vsoe_allocation, :vsoe_amount, :vsoe_deferral, :vsoe_delivered,
|
|
136
|
+
:vsoe_permit_discount, :vsoe_price, :web_site
|
|
137
|
+
# TODO: Add record_type, conflicts with Support::Records#record_type, returns "invoice" versus "tranSales:Invoice"
|
|
138
|
+
|
|
139
|
+
record_refs :account, :bill_address_list, :custom_form, :department, :entity, :klass, :partner,
|
|
140
|
+
:posting_period, :ship_address_list, :terms, :location, :sales_rep, :tax_item, :created_from,
|
|
141
|
+
:ship_method, :lead_source, :promo_code, :subsidiary, :currency, :approval_status, :job, :discount_item,
|
|
142
|
+
:shipping_tax_code
|
|
143
|
+
|
|
144
|
+
attr_reader :internal_id
|
|
145
|
+
attr_accessor :external_id
|
|
146
|
+
|
|
147
|
+
def initialize(attributes = {})
|
|
148
|
+
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
|
149
|
+
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
|
|
150
|
+
initialize_from_attributes_hash(attributes)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def to_record
|
|
154
|
+
rec = super
|
|
155
|
+
if rec["#{record_namespace}:customFieldList"]
|
|
156
|
+
rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
|
|
157
|
+
end
|
|
158
|
+
rec
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def self.search_class_name
|
|
162
|
+
"Transaction"
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class InvoiceItem
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::RecordRefs
|
|
6
|
+
include Support::Records
|
|
7
|
+
include Namespaces::TranSales
|
|
8
|
+
|
|
9
|
+
fields :amount, :amount_ordered, :bin_numbers, :cost_estimate, :cost_estimate_type, :current_percent,
|
|
10
|
+
:defer_rev_rec, :description, :gift_cert_from, :gift_cert_message, :gift_cert_number, :gift_cert_recipient_email,
|
|
11
|
+
:gift_cert_recipient_name, :gross_amt, :inventory_detail, :is_taxable, :item_is_fulfilled, :license_code, :line,
|
|
12
|
+
:options, :order_line, :percent_complete, :quantity, :quantity_available, :quantity_fulfilled,
|
|
13
|
+
:quantity_on_hand, :quantity_ordered, :rate, :rev_rec_end_date, :rev_rec_start_date,
|
|
14
|
+
:serial_numbers, :ship_group, :tax1_amt, :tax_rate1, :tax_rate2, :vsoe_allocation, :vsoe_amount, :vsoe_deferral,
|
|
15
|
+
:vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :create_wo
|
|
16
|
+
|
|
17
|
+
field :custom_field_list, CustomFieldList
|
|
18
|
+
|
|
19
|
+
read_only_fields :quantity_remaining
|
|
20
|
+
|
|
21
|
+
record_refs :department, :item, :job, :location, :price, :rev_rec_schedule, :ship_address, :ship_method, :tax_code, :units, :klass
|
|
22
|
+
|
|
23
|
+
def initialize(attributes_or_record = {})
|
|
24
|
+
case attributes_or_record
|
|
25
|
+
when Hash
|
|
26
|
+
initialize_from_attributes_hash(attributes_or_record)
|
|
27
|
+
when self.class
|
|
28
|
+
initialize_from_record(attributes_or_record)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def initialize_from_record(record)
|
|
33
|
+
self.attributes = record.send(:attributes)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_record
|
|
37
|
+
rec = super
|
|
38
|
+
if rec["#{record_namespace}:customFieldList"]
|
|
39
|
+
rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
|
|
40
|
+
end
|
|
41
|
+
rec
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemAvailability
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::RecordRefs
|
|
6
|
+
include Support::Records
|
|
7
|
+
|
|
8
|
+
field :item, InventoryItem
|
|
9
|
+
field :location_id, Location
|
|
10
|
+
alias_method :location, :location_id
|
|
11
|
+
|
|
12
|
+
field :quantity_on_hand
|
|
13
|
+
field :on_hand_value_mli
|
|
14
|
+
field :reorder_point
|
|
15
|
+
field :quantity_on_order
|
|
16
|
+
field :quantity_committed
|
|
17
|
+
field :quantity_available
|
|
18
|
+
|
|
19
|
+
def self.get_item_availability(ref_list, credentials={})
|
|
20
|
+
response = NetSuite::Client.call(:get_item_availability, message: {
|
|
21
|
+
"platformMsgs:itemAvailabilityFilter" => {
|
|
22
|
+
"platformCore:item" => ref_list.to_record
|
|
23
|
+
}
|
|
24
|
+
}, credentials: credentials)
|
|
25
|
+
return false unless response.success?
|
|
26
|
+
|
|
27
|
+
result = response.body[:get_item_availability_response][:get_item_availability_result]
|
|
28
|
+
unless result[:status][:@is_success] == "true"
|
|
29
|
+
return false
|
|
30
|
+
end
|
|
31
|
+
if result[:item_availability_list]
|
|
32
|
+
result[:item_availability_list][:item_availability].map do |row|
|
|
33
|
+
NetSuite::Records::ItemAvailability.new(row)
|
|
34
|
+
end
|
|
35
|
+
else
|
|
36
|
+
[]
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(attributes = {})
|
|
41
|
+
initialize_from_attributes_hash(attributes)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillment
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::RecordRefs
|
|
6
|
+
include Support::Records
|
|
7
|
+
include Support::Actions
|
|
8
|
+
include Namespaces::TranSales
|
|
9
|
+
|
|
10
|
+
actions :get, :get_list, :add, :initialize, :update, :delete, :search, :upsert, :upsert_list
|
|
11
|
+
|
|
12
|
+
fields :created_from_ship_group, :tran_date, :tran_id, :shipping_cost, :memo, :ship_company, :ship_attention, :ship_addr1,
|
|
13
|
+
:ship_addr2, :ship_city, :ship_state, :ship_zip, :ship_phone, :ship_is_residential,
|
|
14
|
+
:ship_status, :last_modified_date, :created_date, :status
|
|
15
|
+
|
|
16
|
+
read_only_fields :handling_cost
|
|
17
|
+
|
|
18
|
+
record_refs :custom_form, :entity, :created_from, :ship_carrier, :ship_method,
|
|
19
|
+
:ship_address_list, :klass, :ship_country
|
|
20
|
+
|
|
21
|
+
# NOTE API version < 2015_1 only
|
|
22
|
+
field :transaction_ship_address, ShipAddress
|
|
23
|
+
|
|
24
|
+
# NOTE API version >= 2015_1
|
|
25
|
+
field :shipping_address, Address
|
|
26
|
+
|
|
27
|
+
field :item_list, ItemFulfillmentItemList
|
|
28
|
+
field :package_list, ItemFulfillmentPackageList
|
|
29
|
+
field :package_fed_ex_list, ItemFulfillmentPackageFedExList
|
|
30
|
+
field :package_ups_list, ItemFulfillmentPackageUpsList
|
|
31
|
+
field :package_usps_list, ItemFulfillmentPackageUspsList
|
|
32
|
+
field :custom_field_list, CustomFieldList
|
|
33
|
+
|
|
34
|
+
attr_reader :internal_id
|
|
35
|
+
attr_accessor :external_id
|
|
36
|
+
|
|
37
|
+
def initialize(attributes = {})
|
|
38
|
+
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
|
39
|
+
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
|
|
40
|
+
|
|
41
|
+
if !attributes.empty? && attributes[:package_ups_list]
|
|
42
|
+
attributes[:package_list] ||= {}
|
|
43
|
+
attributes[:package_list].merge! attributes[:package_ups_list]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
initialize_from_attributes_hash(attributes)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def to_record
|
|
50
|
+
rec = super
|
|
51
|
+
if rec["#{record_namespace}:customFieldList"]
|
|
52
|
+
rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
|
|
53
|
+
end
|
|
54
|
+
rec
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def self.search_class_name
|
|
58
|
+
"Transaction"
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillmentItem
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::RecordRefs
|
|
6
|
+
include Support::Records
|
|
7
|
+
include Namespaces::TranSales
|
|
8
|
+
|
|
9
|
+
fields :amount, :amount_ordered, :bin_numbers, :cost_estimate, :cost_estimate_type, :current_percent,
|
|
10
|
+
:defer_rev_rec, :description, :gift_cert_from, :gift_cert_message, :gift_cert_number, :gift_cert_recipient_email,
|
|
11
|
+
:gift_cert_recipient_name, :gross_amt, :inventory_detail, :is_taxable, :item_is_fulfilled, :license_code, :line,
|
|
12
|
+
:options, :order_line, :percent_complete, :quantity, :quantity_available, :quantity_fulfilled,
|
|
13
|
+
:quantity_on_hand, :quantity_ordered, :rate, :rev_rec_end_date, :rev_rec_start_date,
|
|
14
|
+
:serial_numbers, :ship_group, :tax1_amt, :tax_rate1, :tax_rate2, :vsoe_allocation, :vsoe_amount, :vsoe_deferral,
|
|
15
|
+
:vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :item_receive
|
|
16
|
+
|
|
17
|
+
field :custom_field_list, CustomFieldList
|
|
18
|
+
|
|
19
|
+
read_only_fields :quantity_remaining
|
|
20
|
+
|
|
21
|
+
record_refs :department, :item, :job, :location, :price, :rev_rec_schedule, :ship_address, :ship_method, :tax_code, :units, :klass
|
|
22
|
+
|
|
23
|
+
def initialize(attributes_or_record = {})
|
|
24
|
+
case attributes_or_record
|
|
25
|
+
when Hash
|
|
26
|
+
initialize_from_attributes_hash(attributes_or_record)
|
|
27
|
+
when self.class
|
|
28
|
+
initialize_from_record(attributes_or_record)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def initialize_from_record(record)
|
|
33
|
+
self.attributes = record.send(:attributes)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_record
|
|
37
|
+
rec = super
|
|
38
|
+
if rec["#{record_namespace}:customFieldList"]
|
|
39
|
+
rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
|
|
40
|
+
end
|
|
41
|
+
rec
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillmentPackage
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::Records
|
|
6
|
+
include Namespaces::TranSales
|
|
7
|
+
|
|
8
|
+
fields :package_weight, :package_descr, :package_tracking_number
|
|
9
|
+
|
|
10
|
+
def initialize(attributes_or_record = {})
|
|
11
|
+
case attributes_or_record
|
|
12
|
+
when Hash
|
|
13
|
+
initialize_from_attributes_hash(attributes_or_record)
|
|
14
|
+
when self.class
|
|
15
|
+
initialize_from_record(attributes_or_record)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def initialize_from_record(record)
|
|
20
|
+
self.attributes = record.send(:attributes)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillmentPackageFedEx
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::Records
|
|
6
|
+
include Namespaces::TranSales
|
|
7
|
+
|
|
8
|
+
fields :authorization_number_fed_ex, :cod_amount_fed_ex, :dry_ice_weight_fed_ex, :insured_value_fed_ex, :is_alcohol_fed_ex,
|
|
9
|
+
:is_non_haz_lithium_fed_ex, :is_non_standard_container_fed_ex, :package_height_fed_ex, :package_length_fed_ex,
|
|
10
|
+
:package_tracking_number_fed_ex, :package_weight_fed_ex, :package_width_fed_ex, :priority_alert_content_fed_ex,
|
|
11
|
+
:reference1_fed_ex, :signature_releasefed_ex, :use_cod_fed_ex, :use_insured_value_fed_ex
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def initialize(attributes_or_record = {})
|
|
15
|
+
case attributes_or_record
|
|
16
|
+
when Hash
|
|
17
|
+
initialize_from_attributes_hash(attributes_or_record)
|
|
18
|
+
when self.class
|
|
19
|
+
initialize_from_record(attributes_or_record)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def initialize_from_record(record)
|
|
24
|
+
self.attributes = record.send(:attributes)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillmentPackageFedExList
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::Records
|
|
6
|
+
include Namespaces::TranSales
|
|
7
|
+
|
|
8
|
+
fields << :package_fed_ex
|
|
9
|
+
|
|
10
|
+
def initialize(attributes = {})
|
|
11
|
+
initialize_from_attributes_hash(attributes)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def package_fed_ex=(packages)
|
|
15
|
+
case packages
|
|
16
|
+
when Hash
|
|
17
|
+
self.packages << ItemFulfillmentPackageFedEx.new(packages)
|
|
18
|
+
when Array
|
|
19
|
+
packages.each { |package| self.packages << ItemFulfillmentPackageFedEx.new(package) }
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def packages
|
|
24
|
+
@packages ||= []
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def to_record
|
|
28
|
+
{ "#{record_namespace}:packageFedEx" => packages.map(&:to_record) }
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillmentPackageList < Support::Sublist
|
|
4
|
+
include Namespaces::TranSales
|
|
5
|
+
|
|
6
|
+
sublist :package, ItemFulfillmentPackage
|
|
7
|
+
|
|
8
|
+
def initialize(attributes = {})
|
|
9
|
+
if attributes.keys != [:package] && attributes.first
|
|
10
|
+
|
|
11
|
+
transformed_attrs = {}
|
|
12
|
+
object = attributes.first.last
|
|
13
|
+
|
|
14
|
+
case object
|
|
15
|
+
when Hash
|
|
16
|
+
object.each do |k, v|
|
|
17
|
+
transformed_attrs.merge!(k[0..-5].to_sym => v)
|
|
18
|
+
end
|
|
19
|
+
when Array
|
|
20
|
+
object.each do |hash|
|
|
21
|
+
hash.each do |k, v|
|
|
22
|
+
transformed_attrs.merge!(k[0..-5].to_sym => v)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
attributes = { package: transformed_attrs }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
initialize_from_attributes_hash(attributes)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
alias :packages :package
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillmentPackageUps
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::Records
|
|
6
|
+
include Namespaces::TranSales
|
|
7
|
+
|
|
8
|
+
fields :additional_handling_ups, :cod_amount_ups, :cod_method_ups, :delivery_conf_ups, :insured_value_ups, :package_descr_ups,
|
|
9
|
+
:package_height_ups, :package_length_ups, :package_tracking_number_ups, :package_weight_ups, :package_width_ups,
|
|
10
|
+
:packaging_ups, :reference1_ups, :reference2_ups, :use_cod_ups
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def initialize(attributes_or_record = {})
|
|
14
|
+
case attributes_or_record
|
|
15
|
+
when Hash
|
|
16
|
+
initialize_from_attributes_hash(attributes_or_record)
|
|
17
|
+
when self.class
|
|
18
|
+
initialize_from_record(attributes_or_record)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def initialize_from_record(record)
|
|
23
|
+
self.attributes = record.send(:attributes)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillmentPackageUpsList
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::Records
|
|
6
|
+
include Namespaces::TranSales
|
|
7
|
+
|
|
8
|
+
fields << :package_ups
|
|
9
|
+
|
|
10
|
+
def initialize(attributes = {})
|
|
11
|
+
initialize_from_attributes_hash(attributes)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def package_ups=(packages)
|
|
15
|
+
case packages
|
|
16
|
+
when Hash
|
|
17
|
+
self.packages << ItemFulfillmentPackageUps.new(packages)
|
|
18
|
+
when Array
|
|
19
|
+
packages.each { |package| self.packages << ItemFulfillmentPackageUps.new(package) }
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def packages
|
|
24
|
+
@packages ||= []
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def to_record
|
|
28
|
+
{ "#{record_namespace}:packageUps" => packages.map(&:to_record) }
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillmentPackageUsps
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::Records
|
|
6
|
+
include Namespaces::TranSales
|
|
7
|
+
|
|
8
|
+
fields :insured_value_usps, :package_descr_usps, :package_height_usps, :package_length_usps,
|
|
9
|
+
:package_tracking_number_usps, :package_weight_usps, :package_width_usps, :reference1_usps, :reference2_usps, :use_insured_value_usps
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def initialize(attributes_or_record = {})
|
|
13
|
+
case attributes_or_record
|
|
14
|
+
when Hash
|
|
15
|
+
initialize_from_attributes_hash(attributes_or_record)
|
|
16
|
+
when self.class
|
|
17
|
+
initialize_from_record(attributes_or_record)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def initialize_from_record(record)
|
|
22
|
+
self.attributes = record.send(:attributes)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module NetSuite
|
|
2
|
+
module Records
|
|
3
|
+
class ItemFulfillmentPackageUspsList
|
|
4
|
+
include Support::Fields
|
|
5
|
+
include Support::Records
|
|
6
|
+
include Namespaces::TranSales
|
|
7
|
+
|
|
8
|
+
fields << :package_usps
|
|
9
|
+
|
|
10
|
+
def initialize(attributes = {})
|
|
11
|
+
initialize_from_attributes_hash(attributes)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def package_usps=(packages)
|
|
15
|
+
case packages
|
|
16
|
+
when Hash
|
|
17
|
+
self.packages << ItemFulfillmentPackageUsps.new(packages)
|
|
18
|
+
when Array
|
|
19
|
+
packages.each { |package| self.packages << ItemFulfillmentPackageUsps.new(package) }
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def packages
|
|
24
|
+
@packages ||= []
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def to_record
|
|
28
|
+
{ "#{record_namespace}:packageUsps" => packages.map(&:to_record) }
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|