Class: Io::Flow::V0::Models::ServiceUnknown
- Inherits:
-
ServiceDescription
- Object
- ServiceDescription
- Io::Flow::V0::Models::ServiceUnknown
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Describes a service used to perform logistic activity outside of our integration.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from ServiceDescription
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ServiceUnknown
constructor
A new instance of ServiceUnknown.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ServiceDescription
Constructor Details
#initialize(incoming = {}) ⇒ ServiceUnknown
Returns a new instance of ServiceUnknown.
65234 65235 65236 65237 65238 65239 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65234 def initialize(incoming={}) super(:discriminator => ServiceDescription::Types::SERVICE_UNKNOWN) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:name], 'ServiceUnknown') @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
65232 65233 65234 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65232 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
65245 65246 65247 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65245 def copy(incoming={}) ServiceUnknown.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
65249 65250 65251 65252 65253 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65249 def subtype_to_hash { :name => name } end |
#to_json ⇒ Object
65241 65242 65243 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65241 def to_json JSON.dump(to_hash) end |