Skip to content

Commit

Permalink
Add NullFieldList to SalesOrder (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgunther authored Jun 21, 2022
1 parent 90ed8f0 commit 64b6199
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The following were removed as `fields` since their sublist class is not yet impl
* Expose `errors` after calls to `delete` action (#545)
* Add `update_list` action where missing on supported item records (#546)
* Ignore `after_submit_failed` status details (>= 2018.2) when collating errors in add action (#550)
* Add `NullFieldList` to `SalesOrder` (#552)

### Fixed

Expand Down
1 change: 1 addition & 0 deletions lib/netsuite/records/sales_order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class SalesOrder
field :gift_cert_redemption_list, GiftCertRedemptionList
field :ship_group_list, SalesOrderShipGroupList
field :promotions_list, PromotionsList
field :null_field_list, NullFieldList

read_only_fields :applied, :discount_total, :sub_total, :tax_total, :total, :unapplied,
:est_gross_profit_percent
Expand Down
17 changes: 17 additions & 0 deletions spec/netsuite/records/sales_order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@
end
end

it 'has all the right fields with specific classes' do
{
billing_address: NetSuite::Records::Address,
custom_field_list: NetSuite::Records::CustomFieldList,
gift_cert_redemption_list: NetSuite::Records::GiftCertRedemptionList,
item_list: NetSuite::Records::SalesOrderItemList,
null_field_list: NetSuite::Records::NullFieldList,
promotions_list: NetSuite::Records::PromotionsList,
ship_group_list: NetSuite::Records::SalesOrderShipGroupList,
shipping_address: NetSuite::Records::Address,
transaction_bill_address: NetSuite::Records::BillAddress,
transaction_ship_address: NetSuite::Records::ShipAddress,
}.each do |field, klass|
expect(salesorder).to have_field(field, klass)
end
end

it 'has all the right record refs' do
[
:account, :bill_address_list, :created_from, :currency, :custom_form, :department, :discount_item,
Expand Down

0 comments on commit 64b6199

Please sign in to comment.