Class: Io::Flow::V0::Models::LabelTrackingCarrierService
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::LabelTrackingCarrierService
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#carrier_id ⇒ Object
readonly
Returns the value of attribute carrier_id.
-
#service_id ⇒ Object
readonly
Returns the value of attribute service_id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ LabelTrackingCarrierService
constructor
A new instance of LabelTrackingCarrierService.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ LabelTrackingCarrierService
Returns a new instance of LabelTrackingCarrierService.
48104 48105 48106 48107 48108 48109 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48104 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:carrier_id], 'LabelTrackingCarrierService') @carrier_id = HttpClient::Preconditions.assert_class('carrier_id', opts.delete(:carrier_id), String) @service_id = (x = opts.delete(:service_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('service_id', x, String)) end |
Instance Attribute Details
#carrier_id ⇒ Object (readonly)
Returns the value of attribute carrier_id.
48102 48103 48104 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48102 def carrier_id @carrier_id end |
#service_id ⇒ Object (readonly)
Returns the value of attribute service_id.
48102 48103 48104 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48102 def service_id @service_id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
48115 48116 48117 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48115 def copy(incoming={}) LabelTrackingCarrierService.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
48119 48120 48121 48122 48123 48124 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48119 def to_hash { :carrier_id => carrier_id, :service_id => service_id } end |
#to_json ⇒ Object
48111 48112 48113 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48111 def to_json JSON.dump(to_hash) end |