class Io::Flow::V0::Models::PriceBookItemExportType
Defines the filters that can be applied when requesting a price book item data export
Attributes
end_date[R]
item_identifier[R]
item_numbers[R]
price_book_key[R]
start_date[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::ExportType::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 60050 def initialize(incoming={}) super(:discriminator => ExportType::Types::PRICE_BOOK_ITEM_EXPORT_TYPE) opts = HttpClient::Helper.symbolize_keys(incoming) @price_book_key = (x = opts.delete(:price_book_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('price_book_key', x, String)) @item_numbers = (x = opts.delete(:item_numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('item_numbers', v, String) }) @start_date = (x = opts.delete(:start_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('start_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @end_date = (x = opts.delete(:end_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('end_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @item_identifier = (x = (x = opts.delete(:item_identifier); x.nil? ? "item_number" : x); x.is_a?(::Io::Flow::V0::Models::ItemIdentifier) ? x : ::Io::Flow::V0::Models::ItemIdentifier.apply(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60064 def copy(incoming={}) PriceBookItemExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60068 def subtype_to_hash { :price_book_key => price_book_key, :item_numbers => item_numbers.nil? ? nil : item_numbers, :start_date => start_date, :end_date => end_date, :item_identifier => item_identifier.value } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60060 def to_json JSON.dump(to_hash) end