Class: Mws::Apis::Feeds::Inventory::Fulfillment
- Inherits:
-
Object
- Object
- Mws::Apis::Feeds::Inventory::Fulfillment
- Defined in:
- lib/mws/apis/feeds/inventory.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#center ⇒ Object
readonly
Returns the value of attribute center.
-
#latency ⇒ Object
readonly
Returns the value of attribute latency.
Instance Method Summary collapse
-
#initialize(center, latency, type) ⇒ Fulfillment
constructor
A new instance of Fulfillment.
Constructor Details
#initialize(center, latency, type) ⇒ Fulfillment
Returns a new instance of Fulfillment.
42 43 44 45 46 47 48 49 50 |
# File 'lib/mws/apis/feeds/inventory.rb', line 42 def initialize(center, latency, type) @center = center @latency = latency unless @latency.nil? or (@latency.to_i == @latency and @latency > 0) raise Mws::Errors::ValidationError.new('Fulfillment latency must be a whole number greater than zero.') end @type = Type.for(type) raise Mws::Errors::ValidationError.new("Fulfillment type must be either 'AFN' or 'MFN'.") if type and @type.nil? end |
Instance Attribute Details
#center ⇒ Object (readonly)
Returns the value of attribute center.
38 39 40 |
# File 'lib/mws/apis/feeds/inventory.rb', line 38 def center @center end |
#latency ⇒ Object (readonly)
Returns the value of attribute latency.
38 39 40 |
# File 'lib/mws/apis/feeds/inventory.rb', line 38 def latency @latency end |