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
data/HISTORY.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
## Unreleased
|
|
2
|
+
|
|
3
|
+
## v2025.2.3
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
* Publish to RubyGems.org as `netsuite-soap` (gem name changed from `netsuite`)
|
|
7
|
+
* RubyGems.org is now the recommended install source; GitHub Packages remains available
|
|
8
|
+
|
|
9
|
+
## v2025.2.2
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
* `GetAll` action spec with fixtures (`Currency` success/error + class method coverage)
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
* Search action no longer leaks `:preferences` key into criteria iteration when both `saved:` and `preferences:` options are passed together
|
|
16
|
+
* Move `refresh_spec.rb` to `spec/netsuite/support/` (matches `Support::Records` mixin where `#refresh` lives)
|
|
17
|
+
|
|
18
|
+
### Breaking Changes
|
|
19
|
+
* **Ruby**: Requires Ruby 3.4.x (`~> 3.4`). CI matrix updated to Ruby 3.4 only.
|
|
20
|
+
|
|
21
|
+
## v2025.2.0
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
* Asynchronous bulk SOAP operations: submit → poll → fetch pattern via `CheckAsyncStatus` and `GetAsyncResult`
|
|
25
|
+
* `AsyncAddList` action (up to 400 records per job); record classes can declare `actions :async_add_list`
|
|
26
|
+
* `AsyncUpdateList` (up to 200 records), `AsyncUpsertList` (up to 200), `AsyncDeleteList` (up to 400), `AsyncGetList` (up to 2000)
|
|
27
|
+
* `AsyncSearch` and `AsyncInitializeList` actions
|
|
28
|
+
* `AsyncResponse` mixin for async action response parsing (`asyncStatusResult` / `asyncResult` envelope shape)
|
|
29
|
+
* README section "Async bulk operations" with submit/poll/fetch example and per-operation limits
|
|
30
|
+
* SOAP 2025.2 WSDL/XSD fixtures under `spec/support/fixtures/soap/v2025_2_0/` for Savon specs
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
* README: correct `multi_tentant!` → `multi_tenant!` in Multi-Tenancy example
|
|
34
|
+
|
|
35
|
+
### Breaking Changes
|
|
36
|
+
* **API version**: Only `api_version '2025_2'` is supported (NetSuite SOAP 2025.2 is the final endpoint; SOAP removed 2028.2). Other versions raise `ConfigurationError`.
|
|
37
|
+
* **Ruby**: Requires Ruby 3.1.0 or later (Gemfile `ruby '>= 3.1.0'`).
|
|
38
|
+
* **Removed**: `NetSuite::Actions::Login` and `login` action (no longer used by the client).
|
|
39
|
+
|
|
40
|
+
## v0.9.4
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
* Add `get_deleted` action to `CustomerCategory` (#595)
|
|
44
|
+
* Add `get_deleted` action to `Customer` (#605)
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
* Revert recent proxy changes which breaks proxy usage by @andrewdicken-stripe in https://github.com/NetSweet/netsuite/pull/579
|
|
48
|
+
|
|
49
|
+
## v0.9.3
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
* Create abstract action parent class by @andrewdicken-stripe in https://github.com/NetSweet/netsuite/pull/568
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
* Add department, klass and location EstimateItem/record_refs by @nickdufresne in https://github.com/NetSweet/netsuite/pull/572
|
|
56
|
+
* Invoice shipping_tax_code should be a record_ref by @stevewoodcock in https://github.com/NetSweet/netsuite/pull/573
|
|
57
|
+
* dont crash if suitetalk returns empty <platformCore:searchRowList/> by @ericcj in https://github.com/NetSweet/netsuite/pull/574
|
|
58
|
+
* Add :klass field to record VendorReturnAuthorizationItem & VendorReturnAuthorization by @shubhrathasetty in https://github.com/NetSweet/netsuite/pull/576
|
|
59
|
+
* Optionally pass in `proxy` parameter to Savon by @dbecker-stripe in https://github.com/NetSweet/netsuite/pull/548
|
|
60
|
+
|
|
61
|
+
## v0.9.2
|
|
62
|
+
|
|
63
|
+
### Fixed
|
|
64
|
+
|
|
65
|
+
* Update rspec requirement from ~> 3.11.0 to ~> 3.12.0 by @dependabot in https://github.com/NetSweet/netsuite/pull/567
|
|
66
|
+
* [Adding UK country mapping](https://github.com/NetSweet/netsuite/commit/5fe96ed28fb8341b6926e169cf50d817632b5b8d)
|
|
67
|
+
|
|
68
|
+
### Breaking Changes
|
|
69
|
+
|
|
70
|
+
* [remove country mapping hack for old API versions](https://github.com/NetSweet/netsuite/commit/a0357f0a9e08eb3a4a80f1d1e7a37f95bcb17d4f)
|
|
71
|
+
|
|
72
|
+
## v0.9.1
|
|
73
|
+
|
|
74
|
+
### Added
|
|
75
|
+
* Add `Configuration#multi_tenant!` for opting into multi-tentant support where configuration/caching is per-thread (#556)
|
|
76
|
+
|
|
77
|
+
### Fixed
|
|
78
|
+
* Avoid Savon version `2.13.0` to prevent generating invalid envelopes. (#558, #563)
|
|
79
|
+
* Retry on `HTTPI::SSLError` and `HTTPI::TimeoutError` in backoff (#566)
|
|
80
|
+
|
|
81
|
+
### Breaking Changes
|
|
82
|
+
* Update default API version to 2016_2 from 2015_1 when `api_version` is not explicitly set (#554)
|
|
83
|
+
|
|
84
|
+
## 0.9.0
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
|
|
88
|
+
* Update `Customer` record fields/record refs for 2021.2. (#535)
|
|
89
|
+
The following were moved from `fields` to `record_refs`: `buying_reason`, `buying_time_frame`, `campaign_category`, `image`, `opening_balance_account`, `pref_cc_processor`, `representing_subsidiary`, `sales_group`, `sales_readiness`
|
|
90
|
+
The following were removed as `fields` since their sublist class is not yet implemented: `download_list`, `group_pricing_list`, `item_pricing_list`
|
|
91
|
+
* Add search-only fields to `Customer` (#535)
|
|
92
|
+
* Add `attach_file` action to `Customer` records (#544)
|
|
93
|
+
* Add `update` action to `File` records (#544)
|
|
94
|
+
* Expose `errors` after calls to `delete` action (#545)
|
|
95
|
+
* Add `update_list` action where missing on supported item records (#546)
|
|
96
|
+
* Add `proxy` attribute to `NetSuite::Configuration` to set a proxy used by the savon client (#547)
|
|
97
|
+
|
|
98
|
+
### Fixed
|
|
99
|
+
* Ignore `after_submit_failed` status details (>= 2018.2) when collating errors in add action (#550)
|
|
100
|
+
* Add `NullFieldList` to `SalesOrder` (#552)
|
|
101
|
+
* Add thread safety to NetSuite configuration and utilities (#549)
|
|
102
|
+
|
|
103
|
+
### Breaking Changes
|
|
104
|
+
* Rename `CustomerSubscriptionsList` to `SubscriptionsList` and `CustomerSubscription` to `Subscription` to match NetSuite naming (#535)
|
|
105
|
+
|
|
106
|
+
## 0.8.12
|
|
107
|
+
|
|
108
|
+
### Added
|
|
109
|
+
|
|
110
|
+
* Add NullFieldList record (to credit memos and invoices) (#529)
|
|
111
|
+
* Add `get_deleted` action to item records (#530)
|
|
112
|
+
* Add `get_deleted` action to Employee records (#531)
|
|
113
|
+
* Remove monkey patched `lower_camelcase` method on String (#533)
|
|
114
|
+
|
|
115
|
+
## 0.8.11
|
|
116
|
+
|
|
117
|
+
### Added
|
|
118
|
+
|
|
119
|
+
* Update ServiceResaleItem record fields/record refs for 2021.2. `item_options_list`, `presentation_item_list`, `site_category_list`, `translations_list` were all removed as fields as the are not simple fields, they require special classes. (#500)
|
|
120
|
+
* Dependabot to CI
|
|
121
|
+
* CI run for Ruby 3.0 & 3.1
|
|
122
|
+
* Add CI run for an environment with and without `tzinfo` installed
|
|
123
|
+
* Update NonInventorySaleItem record fields/record refs for 2021.2. `item_options_list`, `presentation_item_list`, `product_feed_list`, `site_category_list`, `translations_list` were all removed as fields as the are not simple fields, they require special classes. (#503)
|
|
124
|
+
* Implement MatrixOptionList#to_record (#504)
|
|
125
|
+
* Update ItemVendor record fields/record refs for 2021.1. `vendor` is now a record_ref instead of a field. (#505)
|
|
126
|
+
* Update InventoryItem record fields/record refs for 2021.2. `member_list` was removed as a field as it doesn't belong to InventoryItem. (#506)
|
|
127
|
+
* Update LotNumberedInventoryItem record fields/record refs for 2021.2. (#507)
|
|
128
|
+
* Update NonInventoryResaleItem record fields/record refs for 2021.2. `item_options_list`, `presentation_item_list`, `product_feed_list`, `site_category_list`, `translations_list` were all removed as fields as the are not simple fields, they require special classes. (#508)
|
|
129
|
+
* Add `attach_file` action for Invoice and SalesOrder. (#509)
|
|
130
|
+
* Add ItemOptionCustomField recrd (#512)
|
|
131
|
+
* Add Ship Address to Return Authorization (#525)
|
|
132
|
+
* Support translations records (#516)
|
|
133
|
+
|
|
134
|
+
### Fixed
|
|
135
|
+
|
|
136
|
+
* Fix "undefined method `[]` for #<Nori::StringIOFile>" when adding File (#495)
|
|
137
|
+
* Moved definition of `search_joins` attribute from records to search action. The attribute was removed for AssemblyComponent, SerializedInventoryItemLocation, and WorkOrderItem as they don't offer the search action. (#511)
|
|
138
|
+
* Consider externalId in search criteria when using RecordRef as value (#517)
|
|
139
|
+
* Retry http client error subclasses
|
|
140
|
+
* Add upsert list action for cash sales (#523)
|
|
141
|
+
|
|
142
|
+
## 0.8.10
|
|
143
|
+
|
|
144
|
+
### Added
|
|
145
|
+
|
|
146
|
+
* Update Estimate record fields/record refs for 2021.2. `balance`, `bill_address`, `bill_is_residential`, and `is_multi_ship_to` were all removed as fields as either being incorrect, outdated, or a search-only field. (#496)
|
|
147
|
+
|
|
148
|
+
### Fixed
|
|
149
|
+
|
|
150
|
+
* Savon 2.12 supported
|
|
151
|
+
|
|
152
|
+
## 0.8.9
|
|
153
|
+
|
|
154
|
+
### Fixed
|
|
155
|
+
|
|
156
|
+
* Fixed issue where search only fields could be specified when an existing field exists. https://github.com/NetSweet/netsuite/pull/488
|
|
157
|
+
|
|
158
|
+
## 0.8.8
|
|
159
|
+
|
|
160
|
+
### Added
|
|
161
|
+
|
|
162
|
+
* Adding serialized assembly item to get_item
|
|
163
|
+
* Add CostCategory record (#482)
|
|
164
|
+
* Introduce search only fields (#483)
|
|
165
|
+
|
|
166
|
+
### Fixed
|
|
167
|
+
|
|
168
|
+
* Fix accessing custom field values returned in advanced search results (#480)
|
|
169
|
+
* Fixing bug where single-selection custom multi select fields would incorrectly be parsed 3377c971d0cb727d81f4b4bc6e30edfbdfaccfd1
|
|
170
|
+
* Fixed some field definitions on serialized assembly item
|
|
171
|
+
* Properly extract external_id from advanced search results (#478)
|
data/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2026 Robert DeLanghe
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
[](https://github.com/bdelanghe/netsuite/actions/workflows/main.yml)
|
|
2
|
+
[](https://rubygems.org/gems/netsuite-soap)
|
|
3
|
+
[](https://github.com/bdelanghe/netsuite/packages)
|
|
4
|
+

|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://github.com/bdelanghe/netsuite/blob/main/netsuite.gemspec)
|
|
7
|
+
|
|
8
|
+
# netsuite
|
|
9
|
+
|
|
10
|
+
Ruby gem for the NetSuite SuiteTalk SOAP API (v2025.2) with async bulk operations. Maintained fork of [NetSweet/netsuite](https://github.com/NetSweet/netsuite).
|
|
11
|
+
|
|
12
|
+
## Status
|
|
13
|
+
|
|
14
|
+
This gem targets **SOAP 2025.2** — the final supported endpoint. SOAP is removed from NetSuite in 2028.2. This gem exists to bridge existing integrations through that timeline; it is not for new projects.
|
|
15
|
+
|
|
16
|
+
| Release | What happens |
|
|
17
|
+
|---------|-------------|
|
|
18
|
+
| **2025.2** | Last planned SOAP endpoint |
|
|
19
|
+
| **2027.1** | Only 2025.2 supported |
|
|
20
|
+
| **2028.2** | SOAP removed entirely |
|
|
21
|
+
|
|
22
|
+
New integrations should use [SuiteTalk REST Web Services](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_1540391670.html) with OAuth 2.0.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
### RubyGems.org (recommended)
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
# Gemfile
|
|
30
|
+
gem "netsuite-soap"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or from the command line:
|
|
34
|
+
|
|
35
|
+
```shell
|
|
36
|
+
gem install netsuite-soap
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### GitHub Packages
|
|
40
|
+
|
|
41
|
+
```ruby
|
|
42
|
+
# Gemfile
|
|
43
|
+
source "https://rubygems.pkg.github.com/bdelanghe" do
|
|
44
|
+
gem "netsuite"
|
|
45
|
+
end
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Or from the command line:
|
|
49
|
+
|
|
50
|
+
```shell
|
|
51
|
+
gem install netsuite --source "https://rubygems.pkg.github.com/bdelanghe"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Requires Ruby 3.4.
|
|
55
|
+
|
|
56
|
+
## Quick start
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
NetSuite.configure do
|
|
60
|
+
reset!
|
|
61
|
+
account ENV['NETSUITE_ACCOUNT']
|
|
62
|
+
api_version '2025_2'
|
|
63
|
+
consumer_key ENV['NETSUITE_CONSUMER_KEY']
|
|
64
|
+
consumer_secret ENV['NETSUITE_CONSUMER_SECRET']
|
|
65
|
+
token_id ENV['NETSUITE_TOKEN_ID']
|
|
66
|
+
token_secret ENV['NETSUITE_TOKEN_SECRET']
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
customer = NetSuite::Records::Customer.get(4)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
See [docs/configuration.md](docs/configuration.md) for all options (WSDL, sandbox, multi-tenancy, logging).
|
|
73
|
+
|
|
74
|
+
## Async bulk operations
|
|
75
|
+
|
|
76
|
+
For large operations, submit a job and poll for results rather than waiting on a single long-running request. See [docs/async.md](docs/async.md).
|
|
77
|
+
|
|
78
|
+
## Documentation
|
|
79
|
+
|
|
80
|
+
- [Configuration](docs/configuration.md) — WSDL, auth, sandbox, multi-tenancy
|
|
81
|
+
- [Async bulk operations](docs/async.md) — submit/poll/fetch pattern, available operations
|
|
82
|
+
- [Usage](docs/usage.md) — CRUD, search, custom records, null fields, files
|
|
83
|
+
- [Contributing](docs/contributing.md) — Testing, development setup
|
|
84
|
+
|
|
85
|
+
## Credits
|
|
86
|
+
|
|
87
|
+
Based on [NetSweet/netsuite](https://github.com/NetSweet/netsuite). Thanks to the original contributors.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env rake
|
|
2
|
+
require 'bundler/gem_tasks'
|
|
3
|
+
require 'rspec/core/rake_task'
|
|
4
|
+
|
|
5
|
+
desc 'Default: run specs.'
|
|
6
|
+
task :default => :spec
|
|
7
|
+
|
|
8
|
+
desc 'Run specs'
|
|
9
|
+
RSpec::Core::RakeTask.new do |t|
|
|
10
|
+
# t.pattern = './spec/**/*_spec.rb'
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
namespace :fixtures do
|
|
14
|
+
# Sources:
|
|
15
|
+
# https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_3892701016.html
|
|
16
|
+
# https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N3413913.html
|
|
17
|
+
# SOAP is deprecated — 2025.2 is the last planned endpoint (removed in 2028.2).
|
|
18
|
+
WSDL_VERSIONS = {
|
|
19
|
+
# Final endpoint — all integrations should target this
|
|
20
|
+
'v2025_2_0' => { status: :final },
|
|
21
|
+
# Supported
|
|
22
|
+
'v2025_1_0' => { status: :supported },
|
|
23
|
+
'v2024_2_0' => { status: :supported },
|
|
24
|
+
'v2024_1_0' => { status: :supported },
|
|
25
|
+
'v2023_2_0' => { status: :supported },
|
|
26
|
+
'v2023_1_0' => { status: :supported },
|
|
27
|
+
'v2022_2_0' => { status: :supported },
|
|
28
|
+
# Unsupported but still available
|
|
29
|
+
'v2022_1_0' => { status: :unsupported },
|
|
30
|
+
'v2021_2_0' => { status: :unsupported },
|
|
31
|
+
'v2021_1_0' => { status: :unsupported },
|
|
32
|
+
'v2020_2_0' => { status: :unsupported },
|
|
33
|
+
'v2020_1_0' => { status: :unsupported },
|
|
34
|
+
'v2019_2_0' => { status: :unsupported },
|
|
35
|
+
'v2019_1_0' => { status: :unsupported },
|
|
36
|
+
'v2018_2_0' => { status: :unsupported }
|
|
37
|
+
}.freeze
|
|
38
|
+
|
|
39
|
+
BASE_URL = 'https://webservices.netsuite.com'.freeze
|
|
40
|
+
DOWNLOAD_BASE = 'https://content.netsuite.com/download'.freeze
|
|
41
|
+
|
|
42
|
+
def wsdl_url(version)
|
|
43
|
+
"#{BASE_URL}/wsdl/#{version}/netsuite.wsdl"
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def zip_url(version)
|
|
47
|
+
"#{DOWNLOAD_BASE}/WSDL_#{version}.zip"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
desc 'Download WSDL fixtures and all referenced XSD schemas for spec use. ' \
|
|
51
|
+
'Set VERSION=v2025_2_0 to fetch a single version. ' \
|
|
52
|
+
'Set WSDL_SOURCE=<dir> to copy from a local directory instead of downloading.'
|
|
53
|
+
task :wsdl do
|
|
54
|
+
require 'open-uri'
|
|
55
|
+
require 'fileutils'
|
|
56
|
+
require 'rexml/document'
|
|
57
|
+
require 'tmpdir'
|
|
58
|
+
require 'uri'
|
|
59
|
+
require 'zip'
|
|
60
|
+
|
|
61
|
+
fixtures_root = File.join('spec', 'support', 'fixtures')
|
|
62
|
+
local_source = ENV['WSDL_SOURCE']
|
|
63
|
+
|
|
64
|
+
versions = if ENV['VERSION']
|
|
65
|
+
WSDL_VERSIONS.slice(ENV['VERSION']).tap do |v|
|
|
66
|
+
abort "Unknown VERSION '#{ENV['VERSION']}'. Available: #{WSDL_VERSIONS.keys.join(', ')}" if v.empty?
|
|
67
|
+
end
|
|
68
|
+
else
|
|
69
|
+
WSDL_VERSIONS
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
versions.each_key do |version|
|
|
73
|
+
soap_root = File.join(fixtures_root, 'soap', version)
|
|
74
|
+
|
|
75
|
+
if local_source
|
|
76
|
+
install_from_dir(local_source, soap_root)
|
|
77
|
+
else
|
|
78
|
+
install_from_zip(zip_url(version), soap_root)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Install from the official NetSuite zip (https://content.netsuite.com/download/WSDL_<version>.zip).
|
|
84
|
+
# The zip contains a flat directory of files with dotted naming: <category>.<file>.xsd
|
|
85
|
+
def install_from_zip(url, soap_root)
|
|
86
|
+
Dir.mktmpdir do |tmp|
|
|
87
|
+
zip_path = File.join(tmp, 'wsdl.zip')
|
|
88
|
+
puts "Downloading #{url}"
|
|
89
|
+
URI.open(url) { |f| File.binwrite(zip_path, f.read) }
|
|
90
|
+
|
|
91
|
+
puts "Extracting to #{soap_root}"
|
|
92
|
+
Zip::File.open(zip_path) do |zip|
|
|
93
|
+
zip.each do |entry|
|
|
94
|
+
next if entry.directory?
|
|
95
|
+
install_entry(entry.name, entry.get_input_stream.read, soap_root)
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Copy from a pre-extracted local directory (flat dotted naming convention).
|
|
102
|
+
def install_from_dir(source_dir, soap_root)
|
|
103
|
+
Dir[File.join(source_dir, '*')].each do |src|
|
|
104
|
+
install_entry(File.basename(src), File.binread(src), soap_root)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Route a single flat filename to its structured destination.
|
|
109
|
+
# netsuite.wsdl -> wsdl/netsuite.wsdl
|
|
110
|
+
# platform.core.xsd -> xsd/platform/core.xsd
|
|
111
|
+
# transactions.sales.xsd -> xsd/transactions/sales.xsd
|
|
112
|
+
def install_entry(filename, content, soap_root)
|
|
113
|
+
dest = if filename == 'netsuite.wsdl'
|
|
114
|
+
File.join(soap_root, 'wsdl', 'netsuite.wsdl')
|
|
115
|
+
else
|
|
116
|
+
category, rest = filename.split('.', 2)
|
|
117
|
+
File.join(soap_root, 'xsd', category, rest)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
FileUtils.mkdir_p(File.dirname(dest))
|
|
121
|
+
File.binwrite(dest, content)
|
|
122
|
+
puts " #{filename} -> #{dest}"
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
desc 'Generate code coverage'
|
|
127
|
+
RSpec::Core::RakeTask.new(:coverage) do |t|
|
|
128
|
+
t.rcov = true
|
|
129
|
+
t.rcov_opts = ['--exclude', '/gems/,spec']
|
|
130
|
+
end
|
data/docs/async.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Async bulk operations
|
|
2
|
+
|
|
3
|
+
For large operations, submit a job and poll for results rather than waiting on a single long-running request.
|
|
4
|
+
|
|
5
|
+
## Pattern
|
|
6
|
+
|
|
7
|
+
```ruby
|
|
8
|
+
# 1. Submit
|
|
9
|
+
records = 100.times.map { |i| NetSuite::Records::Customer.new(entity_id: "Bulk-#{i}") }
|
|
10
|
+
result = NetSuite::Records::Customer.async_add_list(records)
|
|
11
|
+
job_id = result[:job_id]
|
|
12
|
+
|
|
13
|
+
# 2. Poll
|
|
14
|
+
status = NetSuite::Actions::CheckAsyncStatus.call([job_id])
|
|
15
|
+
sleep 2 until %w[finished failed].include?(status.body[:status])
|
|
16
|
+
|
|
17
|
+
# 3. Fetch (page_index is 1-based)
|
|
18
|
+
response = NetSuite::Actions::GetAsyncResult.call([job_id, 1])
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Available operations
|
|
22
|
+
|
|
23
|
+
| Operation | Max records |
|
|
24
|
+
|-----------|------------|
|
|
25
|
+
| `AsyncAddList` | 400 |
|
|
26
|
+
| `AsyncDeleteList` | 400 |
|
|
27
|
+
| `AsyncGetList` | 2000 |
|
|
28
|
+
| `AsyncUpdateList` | 200 |
|
|
29
|
+
| `AsyncUpsertList` | 200 |
|
|
30
|
+
| `AsyncSearch` | — |
|
|
31
|
+
| `AsyncInitializeList` | — |
|
|
32
|
+
|
|
33
|
+
## Enabling on a record class
|
|
34
|
+
|
|
35
|
+
Record classes opt in via the `actions` DSL:
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
actions :add, :async_add_list, :update, :async_update_list
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Response shape
|
|
42
|
+
|
|
43
|
+
- `async_add_list` / `async_update_list` / `async_upsert_list` — `response.body[:write_response_list]`
|
|
44
|
+
- `async_delete_list` — `response.body[:delete_response_list]`
|
|
45
|
+
- `async_get_list` — `response.body[:read_response_list]`
|
|
46
|
+
- `async_search` — `response.body[:search_result]`
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
## Token Based Authentication (recommended)
|
|
4
|
+
|
|
5
|
+
```ruby
|
|
6
|
+
NetSuite.configure do
|
|
7
|
+
reset!
|
|
8
|
+
|
|
9
|
+
account ENV['NETSUITE_ACCOUNT']
|
|
10
|
+
api_version '2025_2'
|
|
11
|
+
|
|
12
|
+
consumer_key ENV['NETSUITE_CONSUMER_KEY']
|
|
13
|
+
consumer_secret ENV['NETSUITE_CONSUMER_SECRET']
|
|
14
|
+
token_id ENV['NETSUITE_TOKEN_ID']
|
|
15
|
+
token_secret ENV['NETSUITE_TOKEN_SECRET']
|
|
16
|
+
end
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## WSDL and datacenter
|
|
20
|
+
|
|
21
|
+
This gem targets SOAP 2025.2 only. The WSDL defaults to the production URL for v2025_2_0.
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
NetSuite.configure do
|
|
25
|
+
reset!
|
|
26
|
+
api_version '2025_2'
|
|
27
|
+
|
|
28
|
+
# explicit WSDL URL (sandbox, specific datacenter, etc.)
|
|
29
|
+
wsdl "https://webservices.sandbox.netsuite.com/wsdl/v2025_2_0/netsuite.wsdl"
|
|
30
|
+
|
|
31
|
+
# or set just the domain and let the gem build the URL
|
|
32
|
+
wsdl_domain "webservices.na2.netsuite.com"
|
|
33
|
+
end
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## All options
|
|
37
|
+
|
|
38
|
+
```ruby
|
|
39
|
+
NetSuite.configure do
|
|
40
|
+
reset!
|
|
41
|
+
|
|
42
|
+
api_version '2025_2'
|
|
43
|
+
account '12345'
|
|
44
|
+
|
|
45
|
+
# auth (use TBA above instead)
|
|
46
|
+
email 'email@domain.com'
|
|
47
|
+
password 'password'
|
|
48
|
+
role 1111
|
|
49
|
+
|
|
50
|
+
# WSDL
|
|
51
|
+
wsdl "https://webservices.netsuite.com/wsdl/v2025_2_0/netsuite.wsdl"
|
|
52
|
+
wsdl_domain "webservices.na2.netsuite.com"
|
|
53
|
+
|
|
54
|
+
# timeouts
|
|
55
|
+
read_timeout 100_000
|
|
56
|
+
|
|
57
|
+
# logging
|
|
58
|
+
log File.join(Rails.root, 'log/netsuite.log')
|
|
59
|
+
# log_level :debug
|
|
60
|
+
|
|
61
|
+
# ignore read-only fields
|
|
62
|
+
soap_header 'platformMsgs:preferences' => {
|
|
63
|
+
'platformMsgs:ignoreReadOnlyFields' => true,
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Some configuration options mutate others. See `lib/netsuite/configuration.rb` for details.
|
|
69
|
+
|
|
70
|
+
## Multi-tenancy
|
|
71
|
+
|
|
72
|
+
For multiple NetSuite accounts in separate threads:
|
|
73
|
+
|
|
74
|
+
```ruby
|
|
75
|
+
# main thread
|
|
76
|
+
NetSuite.configure do
|
|
77
|
+
multi_tenant!
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# each child thread
|
|
81
|
+
NetSuite.configure do
|
|
82
|
+
reset!
|
|
83
|
+
account ENV['NETSUITE_ACCOUNT']
|
|
84
|
+
# rest of config...
|
|
85
|
+
end
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`multi_tenant!` is not affected by `reset!`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
```shell
|
|
6
|
+
git clone https://github.com/bdelanghe/netsuite.git
|
|
7
|
+
cd netsuite
|
|
8
|
+
bundle install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Tests
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
bundle exec rspec
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Integration tests (live NetSuite calls) are opt-in:
|
|
18
|
+
|
|
19
|
+
```shell
|
|
20
|
+
NETSUITE_INTEGRATION=true bundle exec rspec
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Coverage report:
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
COVERAGE=true bundle exec rspec
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Adding a new action
|
|
30
|
+
|
|
31
|
+
1. Create `lib/netsuite/actions/my_action.rb` inheriting `AbstractAction`
|
|
32
|
+
2. For async actions, `include AsyncResponse`
|
|
33
|
+
3. Register in `lib/netsuite/support/actions.rb`
|
|
34
|
+
4. Add autoload in `lib/netsuite.rb`
|
|
35
|
+
5. Add XML fixture in `spec/support/fixtures/my_action/`
|
|
36
|
+
6. Write spec in `spec/netsuite/actions/my_action_spec.rb`
|