Class: Io::Flow::V0::Models::ShippingLabelDocument
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShippingLabelDocument
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Output data or downloadable links for shipping label documents such as labels or commercial invoices
Instance Attribute Summary collapse
-
#html ⇒ Object
readonly
Returns the value of attribute html.
-
#pdf ⇒ Object
readonly
Returns the value of attribute pdf.
-
#png ⇒ Object
readonly
Returns the value of attribute png.
-
#zpl ⇒ Object
readonly
Returns the value of attribute zpl.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShippingLabelDocument
constructor
A new instance of ShippingLabelDocument.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShippingLabelDocument
Returns a new instance of ShippingLabelDocument.
29944 29945 29946 29947 29948 29949 29950 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29944 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @zpl = (x = opts.delete(:zpl); x.nil? ? nil : HttpClient::Preconditions.assert_class('zpl', x, String)) @pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String)) @png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String)) @html = (x = opts.delete(:html); x.nil? ? nil : HttpClient::Preconditions.assert_class('html', x, String)) end |
Instance Attribute Details
#html ⇒ Object (readonly)
Returns the value of attribute html.
29942 29943 29944 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29942 def html @html end |
#pdf ⇒ Object (readonly)
Returns the value of attribute pdf.
29942 29943 29944 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29942 def pdf @pdf end |
#png ⇒ Object (readonly)
Returns the value of attribute png.
29942 29943 29944 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29942 def png @png end |
#zpl ⇒ Object (readonly)
Returns the value of attribute zpl.
29942 29943 29944 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29942 def zpl @zpl end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29956 29957 29958 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29956 def copy(incoming={}) ShippingLabelDocument.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
29960 29961 29962 29963 29964 29965 29966 29967 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29960 def to_hash { :zpl => zpl, :pdf => pdf, :png => png, :html => html } end |
#to_json ⇒ Object
29952 29953 29954 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29952 def to_json JSON.dump(to_hash) end |