Module: NetSuite

Defined in:
lib/netsuite/actions/add.rb,
lib/netsuite.rb,
lib/netsuite/errors.rb,
lib/netsuite/version.rb,
lib/netsuite/response.rb,
lib/netsuite/utilities.rb,
lib/netsuite/actions/get.rb,
lib/netsuite/records/bin.rb,
lib/netsuite/records/job.rb,
lib/netsuite/records/file.rb,
lib/netsuite/records/note.rb,
lib/netsuite/records/task.rb,
lib/netsuite/records/term.rb,
lib/netsuite/actions/login.rb,
lib/netsuite/configuration.rb,
lib/netsuite/records/roles.rb,
lib/netsuite/actions/delete.rb,
lib/netsuite/actions/search.rb,
lib/netsuite/actions/update.rb,
lib/netsuite/actions/upsert.rb,
lib/netsuite/passports/user.rb,
lib/netsuite/records/folder.rb,
lib/netsuite/records/vendor.rb,
lib/netsuite/support/fields.rb,
lib/netsuite/actions/get_all.rb,
lib/netsuite/passports/token.rb,
lib/netsuite/records/account.rb,
lib/netsuite/records/address.rb,
lib/netsuite/records/contact.rb,
lib/netsuite/records/deposit.rb,
lib/netsuite/records/invoice.rb,
lib/netsuite/records/partner.rb,
lib/netsuite/support/actions.rb,
lib/netsuite/support/country.rb,
lib/netsuite/support/records.rb,
lib/netsuite/support/sublist.rb,
lib/netsuite/actions/get_list.rb,
lib/netsuite/records/campaign.rb,
lib/netsuite/records/currency.rb,
lib/netsuite/records/customer.rb,
lib/netsuite/records/duration.rb,
lib/netsuite/records/employee.rb,
lib/netsuite/records/kit_item.rb,
lib/netsuite/records/location.rb,
lib/netsuite/records/tax_type.rb,
lib/netsuite/support/requests.rb,
lib/netsuite/records/cash_sale.rb,
lib/netsuite/records/note_type.rb,
lib/netsuite/records/role_list.rb,
lib/netsuite/records/tax_group.rb,
lib/netsuite/records/time_bill.rb,
lib/netsuite/actions/initialize.rb,
lib/netsuite/records/department.rb,
lib/netsuite/records/item_group.rb,
lib/netsuite/records/job_status.rb,
lib/netsuite/records/phone_call.rb,
lib/netsuite/records/record_ref.rb,
lib/netsuite/records/subsidiary.rb,
lib/netsuite/records/units_type.rb,
lib/netsuite/records/work_order.rb,
lib/netsuite/support/attributes.rb,
lib/netsuite/actions/delete_list.rb,
lib/netsuite/actions/get_deleted.rb,
lib/netsuite/actions/upsert_list.rb,
lib/netsuite/namespaces/list_emp.rb,
lib/netsuite/namespaces/list_mkt.rb,
lib/netsuite/namespaces/list_rel.rb,
lib/netsuite/namespaces/tran_emp.rb,
lib/netsuite/records/cash_refund.rb,
lib/netsuite/records/credit_memo.rb,
lib/netsuite/records/custom_list.rb,
lib/netsuite/records/item_member.rb,
lib/netsuite/records/item_vendor.rb,
lib/netsuite/records/member_list.rb,
lib/netsuite/records/opportunity.rb,
lib/netsuite/records/sales_order.rb,
lib/netsuite/records/vendor_bill.rb,
lib/netsuite/support/record_refs.rb,
lib/netsuite/namespaces/act_sched.rb,
lib/netsuite/namespaces/list_acct.rb,
lib/netsuite/namespaces/tran_bank.rb,
lib/netsuite/namespaces/tran_cust.rb,
lib/netsuite/namespaces/tran_invt.rb,
lib/netsuite/records/bill_address.rb,
lib/netsuite/records/contact_list.rb,
lib/netsuite/records/contact_role.rb,
lib/netsuite/records/custom_field.rb,
lib/netsuite/records/invoice_item.rb,
lib/netsuite/records/item_receipt.rb,
lib/netsuite/records/payment_item.rb,
lib/netsuite/records/payroll_item.rb,
lib/netsuite/records/ship_address.rb,
lib/netsuite/records/support_case.rb,
lib/netsuite/rest/utilities/roles.rb,
lib/netsuite/namespaces/tran_purch.rb,
lib/netsuite/namespaces/tran_sales.rb,
lib/netsuite/records/assembly_item.rb,
lib/netsuite/records/base_ref_list.rb,
lib/netsuite/records/currency_rate.rb,
lib/netsuite/records/custom_record.rb,
lib/netsuite/records/deposit_other.rb,
lib/netsuite/records/discount_item.rb,
lib/netsuite/records/journal_entry.rb,
lib/netsuite/records/site_category.rb,
lib/netsuite/records/subtotal_item.rb,
lib/netsuite/records/vendor_credit.rb,
lib/netsuite/support/search_result.rb,
lib/netsuite/utilities/data_center.rb,
lib/netsuite/records/assembly_build.rb,
lib/netsuite/records/cash_sale_item.rb,
lib/netsuite/records/classification.rb,
lib/netsuite/records/inventory_item.rb,
lib/netsuite/records/locations_list.rb,
lib/netsuite/records/payment_method.rb,
lib/netsuite/records/pricing_matrix.rb,
lib/netsuite/records/promotion_code.rb,
lib/netsuite/records/purchase_order.rb,
lib/netsuite/records/sales_tax_item.rb,
lib/netsuite/records/transfer_order.rb,
lib/netsuite/records/units_type_uom.rb,
lib/netsuite/records/vendor_payment.rb,
lib/netsuite/rest/utilities/request.rb,
lib/netsuite/namespaces/comm_general.rb,
lib/netsuite/namespaces/file_cabinet.rb,
lib/netsuite/namespaces/list_support.rb,
lib/netsuite/namespaces/list_website.rb,
lib/netsuite/namespaces/setup_custom.rb,
lib/netsuite/namespaces/tran_general.rb,
lib/netsuite/records/bin_number_list.rb,
lib/netsuite/records/customer_refund.rb,
lib/netsuite/records/deposit_payment.rb,
lib/netsuite/records/record_ref_list.rb,
lib/netsuite/records/vendor_category.rb,
lib/netsuite/records/work_order_item.rb,
lib/netsuite/actions/get_select_value.rb,
lib/netsuite/namespaces/platform_core.rb,
lib/netsuite/records/assembly_unbuild.rb,
lib/netsuite/records/billing_schedule.rb,
lib/netsuite/records/cash_refund_item.rb,
lib/netsuite/records/credit_memo_item.rb,
lib/netsuite/records/customer_deposit.rb,
lib/netsuite/records/customer_partner.rb,
lib/netsuite/records/customer_payment.rb,
lib/netsuite/records/description_item.rb,
lib/netsuite/records/gift_certificate.rb,
lib/netsuite/records/inventory_detail.rb,
lib/netsuite/records/inventory_number.rb,
lib/netsuite/records/item_fulfillment.rb,
lib/netsuite/records/item_member_list.rb,
lib/netsuite/records/item_vendor_list.rb,
lib/netsuite/records/opportunity_item.rb,
lib/netsuite/records/rev_rec_schedule.rb,
lib/netsuite/records/rev_rec_template.rb,
lib/netsuite/records/sales_order_item.rb,
lib/netsuite/records/vendor_bill_item.rb,
lib/netsuite/records/accounting_period.rb,
lib/netsuite/records/credit_memo_apply.rb,
lib/netsuite/records/custom_field_list.rb,
lib/netsuite/records/custom_record_ref.rb,
lib/netsuite/records/customer_category.rb,
lib/netsuite/records/customer_currency.rb,
lib/netsuite/records/deposit_cash_back.rb,
lib/netsuite/records/invoice_item_list.rb,
lib/netsuite/records/item_receipt_item.rb,
lib/netsuite/records/service_sale_item.rb,
lib/netsuite/namespaces/platform_common.rb,
lib/netsuite/records/assembly_component.rb,
lib/netsuite/records/custom_record_type.rb,
lib/netsuite/records/deposit_other_list.rb,
lib/netsuite/records/inventory_transfer.rb,
lib/netsuite/records/journal_entry_line.rb,
lib/netsuite/records/matrix_option_list.rb,
lib/netsuite/records/vendor_credit_item.rb,
lib/netsuite/records/cash_sale_item_list.rb,
lib/netsuite/records/contact_addressbook.rb,
lib/netsuite/records/deposit_application.rb,
lib/netsuite/records/purchase_order_item.rb,
lib/netsuite/records/service_resale_item.rb,
lib/netsuite/records/transfer_order_item.rb,
lib/netsuite/records/units_type_uom_list.rb,
lib/netsuite/records/vendor_bill_expense.rb,
lib/netsuite/records/vendor_credit_apply.rb,
lib/netsuite/records/contact_access_roles.rb,
lib/netsuite/records/customer_addressbook.rb,
lib/netsuite/records/deposit_payment_list.rb,
lib/netsuite/records/gift_cert_redemption.rb,
lib/netsuite/records/inventory_adjustment.rb,
lib/netsuite/records/inventory_assignment.rb,
lib/netsuite/records/return_authorization.rb,
lib/netsuite/records/vendor_payment_apply.rb,
lib/netsuite/records/work_order_item_list.rb,
lib/netsuite/records/cash_refund_item_list.rb,
lib/netsuite/records/credit_memo_item_list.rb,
lib/netsuite/records/customer_refund_apply.rb,
lib/netsuite/records/gift_certificate_item.rb,
lib/netsuite/records/item_fulfillment_item.rb,
lib/netsuite/records/opportunity_item_list.rb,
lib/netsuite/records/sales_order_item_list.rb,
lib/netsuite/records/vendor_bill_item_list.rb,
lib/netsuite/records/vendor_credit_expense.rb,
lib/netsuite/records/credit_memo_apply_list.rb,
lib/netsuite/records/customer_currency_list.rb,
lib/netsuite/records/customer_deposit_apply.rb,
lib/netsuite/records/customer_partners_list.rb,
lib/netsuite/records/customer_payment_apply.rb,
lib/netsuite/records/deposit_cash_back_list.rb,
lib/netsuite/records/item_receipt_item_list.rb,
lib/netsuite/records/other_charge_sale_item.rb,
lib/netsuite/records/transaction_ship_group.rb,
lib/netsuite/records/assembly_component_list.rb,
lib/netsuite/records/customer_refund_deposit.rb,
lib/netsuite/records/journal_entry_line_list.rb,
lib/netsuite/records/non_inventory_sale_item.rb,
lib/netsuite/records/vendor_credit_item_list.rb,
lib/netsuite/records/contact_addressbook_list.rb,
lib/netsuite/records/custom_list_custom_value.rb,
lib/netsuite/records/item_fulfillment_package.rb,
lib/netsuite/records/purchase_order_item_list.rb,
lib/netsuite/records/transfer_order_item_list.rb,
lib/netsuite/records/vendor_bill_expense_list.rb,
lib/netsuite/records/vendor_credit_apply_list.rb,
lib/netsuite/records/contact_access_roles_list.rb,
lib/netsuite/records/customer_addressbook_list.rb,
lib/netsuite/records/gift_cert_redemption_list.rb,
lib/netsuite/records/inventory_assignment_list.rb,
lib/netsuite/records/non_inventory_resale_item.rb,
lib/netsuite/records/return_authorization_item.rb,
lib/netsuite/records/serialized_inventory_item.rb,
lib/netsuite/records/vendor_payment_apply_list.rb,
lib/netsuite/records/billing_schedule_milestone.rb,
lib/netsuite/records/customer_refund_apply_list.rb,
lib/netsuite/records/inventory_number_locations.rb,
lib/netsuite/records/item_fulfillment_item_list.rb,
lib/netsuite/records/lot_numbered_assembly_item.rb,
lib/netsuite/records/vendor_credit_expense_list.rb,
lib/netsuite/records/billing_schedule_recurrence.rb,
lib/netsuite/records/customer_deposit_apply_list.rb,
lib/netsuite/records/customer_payment_apply_list.rb,
lib/netsuite/records/non_inventory_purchase_item.rb,
lib/netsuite/records/sales_order_ship_group_list.rb,
lib/netsuite/records/vendor_return_authorization.rb,
lib/netsuite/records/customer_refund_deposit_list.rb,
lib/netsuite/records/inventory_transfer_inventory.rb,
lib/netsuite/records/custom_list_custom_value_list.rb,
lib/netsuite/records/item_fulfillment_package_list.rb,
lib/netsuite/records/inventory_adjustment_inventory.rb,
lib/netsuite/records/return_authorization_item_list.rb,
lib/netsuite/records/billing_schedule_milestone_list.rb,
lib/netsuite/records/inventory_number_locations_list.rb,
lib/netsuite/records/billing_schedule_recurrence_list.rb,
lib/netsuite/records/vendor_return_authorization_item.rb,
lib/netsuite/records/inventory_transfer_inventory_list.rb,
lib/netsuite/records/serialized_inventory_item_numbers.rb,
lib/netsuite/records/serialized_inventory_item_location.rb,
lib/netsuite/records/inventory_adjustment_inventory_list.rb,
lib/netsuite/records/vendor_return_authorization_item_list.rb,
lib/netsuite/records/serialized_inventory_item_numbers_list.rb,
lib/netsuite/records/serialized_inventory_item_locations_list.rb

Overview

Defined Under Namespace

Modules: Actions, Configuration, Namespaces, Passports, Records, Rest, Support, Utilities Classes: ConfigurationError, Error, InitializationError, RecordNotFound, Response

Constant Summary collapse

VERSION =
'0.8.2'

Class Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object



280
281
282
# File 'lib/netsuite.rb', line 280

def self.configure(&block)
  NetSuite::Configuration.instance_eval(&block)
end

.configure_from_env(&block) ⇒ Object



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/netsuite.rb', line 284

def self.configure_from_env(&block)
  NetSuite.configure do
    reset!

    email         ENV['NETSUITE_EMAIL']     unless ENV['NETSUITE_EMAIL'].nil?
    password      ENV['NETSUITE_PASSWORD']  unless ENV['NETSUITE_PASSWORD'].nil?
           ENV['NETSUITE_ACCOUNT']   unless ENV['NETSUITE_ACCOUNT'].nil?
    role          ENV['NETSUITE_ROLE']      unless ENV['NETSUITE_ROLE'].nil?
    api_version   ENV['NETSUITE_API']       unless ENV['NETSUITE_API'].nil?
    sandbox       (ENV['NETSUITE_PRODUCTION'].nil? || ENV['NETSUITE_PRODUCTION'] != 'true')
    wsdl          ENV['NETSUITE_WSDL']      unless ENV['NETSUITE_WSDL'].nil?
    silent        (!ENV['NETSUITE_SILENT'].nil? && ENV['NETSUITE_SILENT'] == 'true')

    read_timeout  100_000
  end

  self.configure(&block) if block
end