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
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: '0286b70e48369bb6c048a18e9db11245df4e9304737f13a4674e2be392804507'
|
|
4
|
+
data.tar.gz: 24e3a94f0aef68c335788755dc1d1f4e61c2b3a6be3c96957acc382894b38344
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 64b140f629ebccbcc92a50824a293d5507285d9bf9d230a41173173619c0165e16236beb535990552bd92bfc93c6e30e6a57ec3725f2276cf25750b105e0eb14
|
|
7
|
+
data.tar.gz: 9829b2c291d8b923195f7710f9ac9399150ced731c0f1c504b2a04eb83fff18b4b140bb40514b622fd753a9dcc8db7f29e8c41e7b2fc76f95b6f3c205e71a2bb
|
data/.envrc
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export BEADS_DIR="/Users/bobby/.local/share/git/bare/io.github/bdelanghe/.beads"
|
|
2
|
+
|
|
3
|
+
# Prefer a repo-defined toolchain via Devbox (Nix). Falls back to rbenv if Devbox
|
|
4
|
+
# isn't installed.
|
|
5
|
+
if command -v devbox >/dev/null 2>&1; then
|
|
6
|
+
eval "$(devbox generate direnv --print-envrc)"
|
|
7
|
+
elif command -v rbenv >/dev/null 2>&1; then
|
|
8
|
+
eval "$(rbenv init -)"
|
|
9
|
+
fi
|
data/.github/FUNDING.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
github: [bdelanghe]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
|
|
4
|
+
# Maintain dependencies for GitHub Actions
|
|
5
|
+
- package-ecosystem: "github-actions"
|
|
6
|
+
directory: "/"
|
|
7
|
+
schedule:
|
|
8
|
+
interval: "daily"
|
|
9
|
+
|
|
10
|
+
# Maintain dependencies for rubygems
|
|
11
|
+
- package-ecosystem: "bundler"
|
|
12
|
+
directory: "/"
|
|
13
|
+
schedule:
|
|
14
|
+
interval: "daily"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [ main ]
|
|
17
|
+
pull_request:
|
|
18
|
+
# The branches below must be a subset of the branches above
|
|
19
|
+
branches: [ main ]
|
|
20
|
+
schedule:
|
|
21
|
+
- cron: '32 15 * * 6'
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
analyze:
|
|
25
|
+
name: Analyze
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
permissions:
|
|
28
|
+
actions: read
|
|
29
|
+
contents: read
|
|
30
|
+
security-events: write
|
|
31
|
+
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
language: [ 'ruby' ]
|
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
37
|
+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
|
38
|
+
|
|
39
|
+
steps:
|
|
40
|
+
- name: Checkout repository
|
|
41
|
+
uses: actions/checkout@v6
|
|
42
|
+
|
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
|
44
|
+
- name: Initialize CodeQL
|
|
45
|
+
uses: github/codeql-action/init@v4
|
|
46
|
+
with:
|
|
47
|
+
languages: ${{ matrix.language }}
|
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
51
|
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
|
52
|
+
|
|
53
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
54
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
55
|
+
- name: Autobuild
|
|
56
|
+
uses: github/codeql-action/autobuild@v4
|
|
57
|
+
|
|
58
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
59
|
+
# 📚 https://git.io/JvXDl
|
|
60
|
+
|
|
61
|
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
62
|
+
# and modify them (or add more) to build your code if your project
|
|
63
|
+
# uses a compiled language
|
|
64
|
+
|
|
65
|
+
#- run: |
|
|
66
|
+
# make bootstrap
|
|
67
|
+
# make release
|
|
68
|
+
|
|
69
|
+
- name: Perform CodeQL Analysis
|
|
70
|
+
uses: github/codeql-action/analyze@v4
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Ruby
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
permissions:
|
|
6
|
+
contents: write
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
ruby-version: ['3.4']
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v6
|
|
16
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
17
|
+
uses: ruby/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: bundle install
|
|
22
|
+
- name: Run tests
|
|
23
|
+
run: bundle exec rspec
|
|
24
|
+
env:
|
|
25
|
+
COVERAGE: 'true'
|
|
26
|
+
- name: Read coverage
|
|
27
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
28
|
+
id: coverage
|
|
29
|
+
run: |
|
|
30
|
+
if [ -f coverage/.last_run.json ]; then
|
|
31
|
+
LINE=$(jq '.result.line' coverage/.last_run.json)
|
|
32
|
+
echo "line=$LINE" >> $GITHUB_OUTPUT
|
|
33
|
+
fi
|
|
34
|
+
- name: Upload coverage badge
|
|
35
|
+
if: steps.coverage.outputs.line && github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
36
|
+
run: |
|
|
37
|
+
LINE=${{ steps.coverage.outputs.line }}
|
|
38
|
+
if [ $(echo "$LINE >= 90" | bc) -eq 1 ]; then COLOR="brightgreen"
|
|
39
|
+
elif [ $(echo "$LINE >= 80" | bc) -eq 1 ]; then COLOR="green"
|
|
40
|
+
elif [ $(echo "$LINE >= 70" | bc) -eq 1 ]; then COLOR="yellowgreen"
|
|
41
|
+
elif [ $(echo "$LINE >= 60" | bc) -eq 1 ]; then COLOR="yellow"
|
|
42
|
+
elif [ $(echo "$LINE >= 50" | bc) -eq 1 ]; then COLOR="orange"
|
|
43
|
+
else COLOR="red"; fi
|
|
44
|
+
|
|
45
|
+
mkdir -p /tmp/badges
|
|
46
|
+
echo "{\"schemaVersion\":1,\"label\":\"coverage\",\"message\":\"${LINE}%\",\"color\":\"${COLOR}\"}" > /tmp/badges/coverage.json
|
|
47
|
+
|
|
48
|
+
cd /tmp/badges
|
|
49
|
+
git init
|
|
50
|
+
git checkout --orphan badges
|
|
51
|
+
git add coverage.json
|
|
52
|
+
git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
|
|
53
|
+
commit -m "Update coverage badge: ${LINE}%"
|
|
54
|
+
git remote add origin "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git"
|
|
55
|
+
git push --force origin badges
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Publish Gem
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
packages: write
|
|
14
|
+
id-token: write
|
|
15
|
+
attestations: write
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
|
|
20
|
+
- name: Set up Ruby
|
|
21
|
+
uses: ruby/setup-ruby@v1
|
|
22
|
+
with:
|
|
23
|
+
ruby-version: '3.4'
|
|
24
|
+
bundler-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Build gem
|
|
27
|
+
run: gem build netsuite.gemspec
|
|
28
|
+
|
|
29
|
+
- name: Attest build provenance
|
|
30
|
+
uses: actions/attest-build-provenance@v4
|
|
31
|
+
with:
|
|
32
|
+
subject-path: '*.gem'
|
|
33
|
+
|
|
34
|
+
- name: Publish to GitHub Packages
|
|
35
|
+
run: |
|
|
36
|
+
mkdir -p $HOME/.gem
|
|
37
|
+
touch $HOME/.gem/credentials
|
|
38
|
+
chmod 0600 $HOME/.gem/credentials
|
|
39
|
+
printf -- "---\n:github: Bearer ${GH_TOKEN}\n" >> $HOME/.gem/credentials
|
|
40
|
+
gem push --key github --host https://rubygems.pkg.github.com/${OWNER} *.gem || echo "Already published to GitHub Packages, skipping."
|
|
41
|
+
env:
|
|
42
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
43
|
+
OWNER: ${{ github.repository_owner }}
|
|
44
|
+
|
|
45
|
+
- name: Publish to RubyGems.org
|
|
46
|
+
run: |
|
|
47
|
+
mkdir -p $HOME/.gem
|
|
48
|
+
touch $HOME/.gem/credentials
|
|
49
|
+
chmod 0600 $HOME/.gem/credentials
|
|
50
|
+
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" >> $HOME/.gem/credentials
|
|
51
|
+
gem push *.gem || echo "Already published to RubyGems.org, skipping."
|
|
52
|
+
env:
|
|
53
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
data/.gitignore
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
*.gem
|
|
2
|
+
*.rbc
|
|
3
|
+
.bundle
|
|
4
|
+
.config
|
|
5
|
+
.beads
|
|
6
|
+
.devbox
|
|
7
|
+
.env
|
|
8
|
+
.yardoc
|
|
9
|
+
Gemfile.lock
|
|
10
|
+
InstalledFiles
|
|
11
|
+
_yardoc
|
|
12
|
+
coverage
|
|
13
|
+
devbox.lock
|
|
14
|
+
doc/
|
|
15
|
+
lib/bundler/man
|
|
16
|
+
pkg
|
|
17
|
+
rdoc
|
|
18
|
+
spec/reports
|
|
19
|
+
test/tmp
|
|
20
|
+
test/version_tmp
|
|
21
|
+
tmp
|
|
22
|
+
vendor/
|
|
23
|
+
.tags*
|
data/.rspec
ADDED
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.4.8
|
data/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby 3.4.8
|
data/AGENTS.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Project Instructions for AI Agents
|
|
2
|
+
|
|
3
|
+
This file provides instructions and context for AI coding agents working on this project.
|
|
4
|
+
|
|
5
|
+
<!-- BEGIN BEADS INTEGRATION -->
|
|
6
|
+
## Issue Tracking with bd (beads)
|
|
7
|
+
|
|
8
|
+
**IMPORTANT**: This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods.
|
|
9
|
+
|
|
10
|
+
### Why bd?
|
|
11
|
+
|
|
12
|
+
- Dependency-aware: Track blockers and relationships between issues
|
|
13
|
+
- Git-friendly: Auto-syncs to JSONL for version control
|
|
14
|
+
- Agent-optimized: JSON output, ready work detection, discovered-from links
|
|
15
|
+
- Prevents duplicate tracking systems and confusion
|
|
16
|
+
|
|
17
|
+
### Quick Start
|
|
18
|
+
|
|
19
|
+
**Check for ready work:**
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
bd ready --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Create new issues:**
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json
|
|
29
|
+
bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Claim and update:**
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bd update bd-42 --status in_progress --json
|
|
36
|
+
bd update bd-42 --priority 1 --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Complete work:**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bd close bd-42 --reason "Completed" --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Issue Types
|
|
46
|
+
|
|
47
|
+
- `bug` - Something broken
|
|
48
|
+
- `feature` - New functionality
|
|
49
|
+
- `task` - Work item (tests, docs, refactoring)
|
|
50
|
+
- `epic` - Large feature with subtasks
|
|
51
|
+
- `chore` - Maintenance (dependencies, tooling)
|
|
52
|
+
|
|
53
|
+
### Priorities
|
|
54
|
+
|
|
55
|
+
- `0` - Critical (security, data loss, broken builds)
|
|
56
|
+
- `1` - High (major features, important bugs)
|
|
57
|
+
- `2` - Medium (default, nice-to-have)
|
|
58
|
+
- `3` - Low (polish, optimization)
|
|
59
|
+
- `4` - Backlog (future ideas)
|
|
60
|
+
|
|
61
|
+
### Workflow for AI Agents
|
|
62
|
+
|
|
63
|
+
1. **Check ready work**: `bd ready` shows unblocked issues
|
|
64
|
+
2. **Claim your task**: `bd update <id> --status in_progress`
|
|
65
|
+
3. **Work on it**: Implement, test, document
|
|
66
|
+
4. **Discover new work?** Create linked issue:
|
|
67
|
+
- `bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:<parent-id>`
|
|
68
|
+
5. **Complete**: `bd close <id> --reason "Done"`
|
|
69
|
+
|
|
70
|
+
### Auto-Sync
|
|
71
|
+
|
|
72
|
+
bd automatically syncs with git:
|
|
73
|
+
|
|
74
|
+
- Exports to `.beads/issues.jsonl` after changes (5s debounce)
|
|
75
|
+
- Imports from JSONL when newer (e.g., after `git pull`)
|
|
76
|
+
- No manual export/import needed!
|
|
77
|
+
|
|
78
|
+
### Important Rules
|
|
79
|
+
|
|
80
|
+
- ✅ Use bd for ALL task tracking
|
|
81
|
+
- ✅ Always use `--json` flag for programmatic use
|
|
82
|
+
- ✅ Link discovered work with `discovered-from` dependencies
|
|
83
|
+
- ✅ Check `bd ready` before asking "what should I work on?"
|
|
84
|
+
- ❌ Do NOT create markdown TODO lists
|
|
85
|
+
- ❌ Do NOT use external issue trackers
|
|
86
|
+
- ❌ Do NOT duplicate tracking systems
|
|
87
|
+
|
|
88
|
+
For more details, see README.md and docs/QUICKSTART.md.
|
|
89
|
+
|
|
90
|
+
### Operational Rules for AI Agents
|
|
91
|
+
|
|
92
|
+
- ✅ Do NOT use `bd edit` (interactive editor). Use `bd update` flags instead.
|
|
93
|
+
- ✅ After making any bd changes, run `bd sync` to flush JSONL and git.
|
|
94
|
+
- ✅ For manual bd testing, use an isolated DB: `BEADS_DB=/tmp/test.db`.
|
|
95
|
+
- ✅ When committing work for an issue, include the issue ID in the commit message, e.g. `Fix flaky spec (bd-123)`.
|
|
96
|
+
|
|
97
|
+
### Troubleshooting and Debugging
|
|
98
|
+
|
|
99
|
+
- ✅ Enable debug logs with env vars when diagnosing issues:
|
|
100
|
+
- `BD_DEBUG` (general), `BD_DEBUG_RPC` (daemon RPC), `BD_DEBUG_SYNC` (sync/import), `BD_DEBUG_FRESHNESS` (db file replacement, daemon logs).
|
|
101
|
+
- ✅ Capture debug output to a file when needed: `BD_DEBUG=1 bd sync 2> debug.log`.
|
|
102
|
+
- ✅ Daemon logs live in `.beads/daemon.log` (use `tail -f .beads/daemon.log`).
|
|
103
|
+
- ✅ In sandboxed environments, use `bd --sandbox` to avoid daemon/staleness issues; run `bd sync` after leaving sandbox.
|
|
104
|
+
|
|
105
|
+
### Architecture (Quick Understanding)
|
|
106
|
+
|
|
107
|
+
- ✅ Three-layer model: CLI → local SQLite (`.beads/beads.db`) → git-tracked JSONL (`.beads/issues.jsonl`) → remote git.
|
|
108
|
+
- ✅ SQLite is fast local cache; JSONL is the source of truth shared via git.
|
|
109
|
+
- ✅ Daemon batches writes (default 5s debounce) and manages auto-export/import.
|
|
110
|
+
- ✅ Hash-based IDs prevent collisions across branches and agents.
|
|
111
|
+
- ✅ Protected-branch workflow uses `sync.branch` (this repo sets `beads-sync`) to keep metadata off `main`.
|
|
112
|
+
|
|
113
|
+
### Configuration Notes
|
|
114
|
+
|
|
115
|
+
- ✅ Tool-level config (Viper) uses flags/env/`.beads/config.yaml` for CLI behavior; project-level config uses `bd config` keys stored in the DB.
|
|
116
|
+
- ✅ Prefer `bd config set|get|list` over manual YAML edits for project settings.
|
|
117
|
+
- ✅ `sync.branch` controls protected-branch workflow; `flush-debounce` controls auto-export batching.
|
|
118
|
+
- ✅ Actor resolution order: `--actor` → `BD_ACTOR` → `BEADS_ACTOR` → `git config user.name` → `$USER`.
|
|
119
|
+
|
|
120
|
+
### CLI Reference (Quick)
|
|
121
|
+
|
|
122
|
+
- ✅ Basics: `bd info --json`, `bd ready --json`, `bd list --json`, `bd show <id> --json`.
|
|
123
|
+
- ✅ Updates: `bd create "Title" -t task -p 2 -d "Desc" --json`, `bd update <id> --status in_progress --json`, `bd close <id> --reason "Done" --json`.
|
|
124
|
+
- ✅ Dependencies: `bd dep add <child> <parent> --type discovered-from`, or `bd create ... --deps discovered-from:<parent> --json`.
|
|
125
|
+
- ✅ Global flags (prefix before command): `--json`, `--no-daemon`, `--no-auto-flush`, `--no-auto-import`, `--sandbox`, `--allow-stale`.
|
|
126
|
+
|
|
127
|
+
### Git Workflow Reference
|
|
128
|
+
|
|
129
|
+
- ✅ See `workflow.md` for git integration, worktrees, merge driver, hooks, and protected-branch workflow.
|
|
130
|
+
|
|
131
|
+
<!-- END BEADS INTEGRATION -->
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## Build & Test
|
|
135
|
+
|
|
136
|
+
_Add your build and test commands here_
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Example:
|
|
140
|
+
# npm install
|
|
141
|
+
# npm test
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Architecture Overview
|
|
145
|
+
|
|
146
|
+
_Add a brief overview of your project architecture_
|
|
147
|
+
|
|
148
|
+
## Conventions & Patterns
|
|
149
|
+
|
|
150
|
+
_Add your project-specific conventions here_
|
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## What This Is
|
|
6
|
+
|
|
7
|
+
A Ruby gem for `netsuite-async-list`, wrapping the Oracle NetSuite SuiteTalk **SOAP Web Services API** via the Savon client. The `async-list` branch adds asynchronous bulk SOAP operations. **Note:** NetSuite is deprecating SOAP (final endpoint 2025.2, removed 2028.2). This gem is in maintenance mode.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Run all tests
|
|
13
|
+
bundle exec rspec
|
|
14
|
+
# or
|
|
15
|
+
bundle exec rake
|
|
16
|
+
|
|
17
|
+
# Run a single spec file
|
|
18
|
+
bundle exec rspec spec/netsuite/actions/async_add_list_spec.rb
|
|
19
|
+
|
|
20
|
+
# Run with coverage
|
|
21
|
+
bundle exec rake coverage
|
|
22
|
+
|
|
23
|
+
# Integration tests (makes live NetSuite calls)
|
|
24
|
+
NETSUITE_INTEGRATION=true bundle exec rspec
|
|
25
|
+
|
|
26
|
+
# Build the gem
|
|
27
|
+
bundle exec rake build
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Replaying a failed run
|
|
31
|
+
When CI (or a local run) fails, the RSpec seed is in the output (e.g. "Randomized with seed 12345"). Re-run with that seed to reproduce the same order:
|
|
32
|
+
```bash
|
|
33
|
+
bundle exec rspec --seed 12345
|
|
34
|
+
```
|
|
35
|
+
Use `bundle exec rspec --only-failures` to re-run only the examples that failed last time (requires `tmp/rspec_examples.txt` from a previous run).
|
|
36
|
+
|
|
37
|
+
There is no linter configured (no `.rubocop.yml`).
|
|
38
|
+
|
|
39
|
+
## Architecture
|
|
40
|
+
|
|
41
|
+
### Action Pattern
|
|
42
|
+
Each SOAP operation is a class under `NetSuite::Actions`. Actions inherit `AbstractAction` and implement `action_name` + `request_body`. The `Support::Requests` mixin provides the `call` class method and response wrapping. Each action also has an inner `Support::ClassMethods` module that gets `include`d into record classes via the `actions(...)` DSL.
|
|
43
|
+
|
|
44
|
+
### Async Operations (this branch)
|
|
45
|
+
Two-phase pattern:
|
|
46
|
+
1. **Submit** — `AsyncAddList.call(...)` returns `{ job_id:, status: 'pending' }`
|
|
47
|
+
2. **Poll** — `CheckAsyncStatus.call([job_id])`
|
|
48
|
+
3. **Fetch** — `GetAsyncResult.call([job_id, { page_index: 1 }])`
|
|
49
|
+
|
|
50
|
+
The `AsyncResponse` module (in `actions/async_response.rb`) is mixed into all async action classes; it overrides response parsing for the `asyncStatusResult`/`asyncResult` SOAP envelope shape.
|
|
51
|
+
|
|
52
|
+
### Record Composition
|
|
53
|
+
Record classes compose behavior via `include`:
|
|
54
|
+
- `Support::Fields` — `field`/`read_only_field`/`search_only_field` DSL
|
|
55
|
+
- `Support::Records` — `to_record` serialization (snake_case attrs → camelCase SOAP XML)
|
|
56
|
+
- `Support::Actions` — `actions(:get, :add, :async_add_list, ...)` DSL
|
|
57
|
+
- `Namespaces::*` — SOAP namespace module per record type (e.g. `ListRel`, `TranSales`)
|
|
58
|
+
|
|
59
|
+
### SOAP Endpoint
|
|
60
|
+
This gem targets **SOAP v2025.2** — the final supported NetSuite endpoint (removed in 2028.2).
|
|
61
|
+
|
|
62
|
+
There is no "current SOAP endpoint" stored in NetSuite. The endpoint you use is fully defined by **account ID + domain shard + SOAP version pinned in your code**. NetSuite doesn't choose this for you.
|
|
63
|
+
|
|
64
|
+
Endpoint formula: `https://<account_id>.<domain>/services/NetSuitePort_<version>`
|
|
65
|
+
|
|
66
|
+
Two config values pin the version:
|
|
67
|
+
- **`api_version '2025_2'`** — controls SOAP namespace URIs in request envelopes (enforced; no other value accepted)
|
|
68
|
+
- **`wsdl`** — WSDL Savon uses; local fixtures at `spec/support/fixtures/soap/v2025_2_0/`
|
|
69
|
+
|
|
70
|
+
Production setup:
|
|
71
|
+
```ruby
|
|
72
|
+
NetSuite.configure do
|
|
73
|
+
account ENV['NETSUITE_ACCOUNT']
|
|
74
|
+
api_version '2025_2'
|
|
75
|
+
wsdl "https://#{ENV['NETSUITE_ACCOUNT']}.netsuite.com/wsdl/v2025_2_0/netsuite.wsdl"
|
|
76
|
+
end
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
To verify: search the codebase for `api_version` / `wsdl`, or inspect the `POST /services/NetSuitePort_2025_2` in Savon request logs. If the hostname contains `sb1`/`sb2`, you're on a sandbox shard.
|
|
80
|
+
|
|
81
|
+
### Configuration
|
|
82
|
+
`NetSuite::Configuration` is `extend self` (module singleton). Multi-tenancy is supported via `Thread.current` namespacing.
|
|
83
|
+
|
|
84
|
+
### Transport vs structure (Faraday migration)
|
|
85
|
+
|
|
86
|
+
**Faraday** and **Nokogiri** are orthogonal: Faraday = *how bytes move* (HTTP client); Nokogiri = *how documents are understood* (XML parse/query). Savon bundled both plus SOAP semantics, which hid control and coupled Rack. Replacing Savon means keeping that boundary clear:
|
|
87
|
+
|
|
88
|
+
- **Faraday**: open connection, POST body, return status + raw body. It does not care whether the body is XML or JSON.
|
|
89
|
+
- **Nokogiri**: parse `resp.body` (from Faraday, disk, or anywhere), XPath/CSS, serialize. It does not care where the document came from.
|
|
90
|
+
|
|
91
|
+
Flow: `resp = connection.post(...); doc = Nokogiri::XML(resp.body); parse(doc)`. No magic, no Rack, no SOAP abstraction leak. When adding a Faraday backend to `NetSuite::Client`, use Faraday for transport and Nokogiri only for request/response XML (build envelope, parse body into the same `#success?` / `#body` shape callers expect).
|
|
92
|
+
|
|
93
|
+
### Key Locations
|
|
94
|
+
- `lib/netsuite/client.rb` — single SOAP call boundary; today Savon, later swappable to Faraday + Nokogiri
|
|
95
|
+
- `lib/netsuite/actions/` — all SOAP operation classes (sync + async)
|
|
96
|
+
- `lib/netsuite/records/` — 200+ NetSuite record classes
|
|
97
|
+
- `lib/netsuite/support/` — shared mixins (`Fields`, `Actions`, `Records`, `Requests`, etc.)
|
|
98
|
+
- `lib/netsuite/configuration.rb` — Savon client config, auth, WSDL
|
|
99
|
+
- `spec/support/fixtures/` — XML fixture files for Savon mock responses, one directory per action
|
|
100
|
+
|
|
101
|
+
### Test Setup
|
|
102
|
+
Tests use RSpec 3 with Savon's `SpecHelper` to mock SOAP calls. Each action spec loads XML fixtures from `spec/support/fixtures/<action_name>/`. Integration tests are tagged `:integration` and skipped unless `NETSUITE_INTEGRATION=true`.
|
|
103
|
+
|
|
104
|
+
## Adding a New Action
|
|
105
|
+
|
|
106
|
+
1. Create `lib/netsuite/actions/my_action.rb` inheriting `AbstractAction` (or an existing action for overrides)
|
|
107
|
+
2. For async actions, `include AsyncResponse`
|
|
108
|
+
3. Register in `lib/netsuite/support/actions.rb` (the `action(...)` DSL dispatch map)
|
|
109
|
+
4. Add autoload in `lib/netsuite.rb`
|
|
110
|
+
5. Add XML fixture in `spec/support/fixtures/my_action/`
|
|
111
|
+
6. Write spec in `spec/netsuite/actions/my_action_spec.rb`
|
data/DEVELOPMENT.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
This repo prefers a repo-defined Ruby toolchain via Devbox.
|
|
4
|
+
|
|
5
|
+
## Devbox (status & trade-offs)
|
|
6
|
+
Devbox is considered a modern, valid way to manage per-project development environments, especially when you want reproducibility and consistent tooling across machines and CI. It’s actively developed and provides a reproducible shell by declaring tools in `devbox.json` (backed by Nix) without requiring contributors to write Nix expressions. ([Jetify][1])
|
|
7
|
+
|
|
8
|
+
Trade-off: if you need maximum control, native Nix flakes/devshells are more flexible; Devbox is intentionally a simpler layer on top.
|
|
9
|
+
|
|
10
|
+
References:
|
|
11
|
+
- [Jetify (Devbox)][1]
|
|
12
|
+
- [DevTools Guide overview][2]
|
|
13
|
+
|
|
14
|
+
[1]: https://www.jetify.com/devbox
|
|
15
|
+
[2]: https://www.devtoolsguide.com/devbox-reproducible-dev-environments/
|
|
16
|
+
|
|
17
|
+
## Getting started
|
|
18
|
+
- Install Devbox.
|
|
19
|
+
- Enter the environment:
|
|
20
|
+
- `devbox shell`
|
|
21
|
+
- or (recommended) `direnv allow` if you use direnv.
|
|
22
|
+
|
|
23
|
+
## Sanity checks
|
|
24
|
+
From inside the Devbox environment:
|
|
25
|
+
- `which ruby && ruby -v`
|
|
26
|
+
- `which gem && gem --version`
|
|
27
|
+
- `bundle -v`
|
|
28
|
+
|
|
29
|
+
## Publishing (RubyGems)
|
|
30
|
+
Devbox does not override `HOME` by default, so RubyGems credentials continue to live at `~/.gem/credentials`.
|
|
31
|
+
|
|
32
|
+
Typical flow:
|
|
33
|
+
- `gem build netsuite.gemspec`
|
|
34
|
+
- `gem push netsuite-<version>.gem`
|