Class: Io::Flow::V0::Models::OrderExportType
- Inherits:
-
ExportType
- Object
- ExportType
- Io::Flow::V0::Models::OrderExportType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Exports orders
Instance Attribute Summary collapse
-
#has_tracking_label ⇒ Object
readonly
Returns the value of attribute has_tracking_label.
-
#min_hours_since_submitted_at ⇒ Object
readonly
Returns the value of attribute min_hours_since_submitted_at.
-
#numbers ⇒ Object
readonly
Returns the value of attribute numbers.
-
#sort ⇒ Object
readonly
Returns the value of attribute sort.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#submitted_on_or_after ⇒ Object
readonly
Returns the value of attribute submitted_on_or_after.
-
#submitted_on_or_before ⇒ Object
readonly
Returns the value of attribute submitted_on_or_before.
Attributes inherited from ExportType
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderExportType
constructor
A new instance of OrderExportType.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ExportType
Constructor Details
#initialize(incoming = {}) ⇒ OrderExportType
Returns a new instance of OrderExportType.
47993 47994 47995 47996 47997 47998 47999 48000 48001 48002 48003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47993 def initialize(incoming={}) super(:discriminator => ExportType::Types::ORDER_EXPORT_TYPE) opts = HttpClient::Helper.symbolize_keys(incoming) @numbers = (x = opts.delete(:numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) }) @min_hours_since_submitted_at = (x = opts.delete(:min_hours_since_submitted_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('min_hours_since_submitted_at', x, Integer)) @submitted_on_or_before = (x = opts.delete(:submitted_on_or_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('submitted_on_or_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @submitted_on_or_after = (x = opts.delete(:submitted_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('submitted_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @status = (x = opts.delete(:status); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderStatus) ? x : ::Io::Flow::V0::Models::OrderStatus.apply(x))) @has_tracking_label = (x = opts.delete(:has_tracking_label); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('has_tracking_label', x)) @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String)) end |
Instance Attribute Details
#has_tracking_label ⇒ Object (readonly)
Returns the value of attribute has_tracking_label.
47991 47992 47993 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47991 def has_tracking_label @has_tracking_label end |
#min_hours_since_submitted_at ⇒ Object (readonly)
Returns the value of attribute min_hours_since_submitted_at.
47991 47992 47993 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47991 def min_hours_since_submitted_at @min_hours_since_submitted_at end |
#numbers ⇒ Object (readonly)
Returns the value of attribute numbers.
47991 47992 47993 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47991 def numbers @numbers end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
47991 47992 47993 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47991 def sort @sort end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
47991 47992 47993 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47991 def status @status end |
#submitted_on_or_after ⇒ Object (readonly)
Returns the value of attribute submitted_on_or_after.
47991 47992 47993 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47991 def submitted_on_or_after @submitted_on_or_after end |
#submitted_on_or_before ⇒ Object (readonly)
Returns the value of attribute submitted_on_or_before.
47991 47992 47993 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47991 def submitted_on_or_before @submitted_on_or_before end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
48009 48010 48011 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48009 def copy(incoming={}) OrderExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
48013 48014 48015 48016 48017 48018 48019 48020 48021 48022 48023 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48013 def subtype_to_hash { :numbers => numbers.nil? ? nil : numbers, :min_hours_since_submitted_at => min_hours_since_submitted_at, :submitted_on_or_before => submitted_on_or_before, :submitted_on_or_after => submitted_on_or_after, :status => status.nil? ? nil : status.value, :has_tracking_label => has_tracking_label, :sort => sort } end |
#to_json ⇒ Object
48005 48006 48007 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48005 def to_json JSON.dump(to_hash) end |