Class: Io::Flow::V0::Models::BridgeManifest
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::BridgeManifest
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents closeout of a group of labels that have been transferred to the carrier for shipping
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#pdf ⇒ Object
readonly
Returns the value of attribute pdf.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ BridgeManifest
constructor
A new instance of BridgeManifest.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ BridgeManifest
Returns a new instance of BridgeManifest.
32448 32449 32450 32451 32452 32453 32454 32455 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32448 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :service, :pdf, :data], 'BridgeManifest') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x)) @pdf = HttpClient::Preconditions.assert_class('pdf', opts.delete(:pdf), String) @data = HttpClient::Preconditions.assert_class('data', opts.delete(:data), String) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
32446 32447 32448 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32446 def data @data end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
32446 32447 32448 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32446 def id @id end |
#pdf ⇒ Object (readonly)
Returns the value of attribute pdf.
32446 32447 32448 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32446 def pdf @pdf end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
32446 32447 32448 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32446 def service @service end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
32461 32462 32463 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32461 def copy(incoming={}) BridgeManifest.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
32465 32466 32467 32468 32469 32470 32471 32472 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32465 def to_hash { :id => id, :service => service.to_hash, :pdf => pdf, :data => data } end |
#to_json ⇒ Object
32457 32458 32459 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32457 def to_json JSON.dump(to_hash) end |