Class: Io::Flow::V0::Models::CenterCapabilities
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CenterCapabilities
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Capabilities of each center. This is used when determining if a crossdock solution is required
Instance Attribute Summary collapse
-
#commercial_invoice ⇒ Object
readonly
Returns the value of attribute commercial_invoice.
-
#crossdock ⇒ Object
readonly
Returns the value of attribute crossdock.
-
#domestic_shipping ⇒ Object
readonly
Returns the value of attribute domestic_shipping.
-
#internal_shipping ⇒ Object
readonly
Returns the value of attribute internal_shipping.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CenterCapabilities
constructor
A new instance of CenterCapabilities.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CenterCapabilities
Returns a new instance of CenterCapabilities.
16427 16428 16429 16430 16431 16432 16433 16434 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16427 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:domestic_shipping, :internal_shipping, :commercial_invoice, :crossdock], 'CenterCapabilities') @domestic_shipping = HttpClient::Preconditions.assert_boolean('domestic_shipping', opts.delete(:domestic_shipping)) @internal_shipping = HttpClient::Preconditions.assert_boolean('internal_shipping', opts.delete(:internal_shipping)) @commercial_invoice = HttpClient::Preconditions.assert_boolean('commercial_invoice', opts.delete(:commercial_invoice)) @crossdock = HttpClient::Preconditions.assert_boolean('crossdock', opts.delete(:crossdock)) end |
Instance Attribute Details
#commercial_invoice ⇒ Object (readonly)
Returns the value of attribute commercial_invoice.
16425 16426 16427 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16425 def commercial_invoice @commercial_invoice end |
#crossdock ⇒ Object (readonly)
Returns the value of attribute crossdock.
16425 16426 16427 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16425 def crossdock @crossdock end |
#domestic_shipping ⇒ Object (readonly)
Returns the value of attribute domestic_shipping.
16425 16426 16427 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16425 def domestic_shipping @domestic_shipping end |
#internal_shipping ⇒ Object (readonly)
Returns the value of attribute internal_shipping.
16425 16426 16427 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16425 def internal_shipping @internal_shipping end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
16440 16441 16442 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16440 def copy(incoming={}) CenterCapabilities.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
16444 16445 16446 16447 16448 16449 16450 16451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16444 def to_hash { :domestic_shipping => domestic_shipping, :internal_shipping => internal_shipping, :commercial_invoice => commercial_invoice, :crossdock => crossdock } end |
#to_json ⇒ Object
16436 16437 16438 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16436 def to_json JSON.dump(to_hash) end |