Class: Io::Flow::V0::Models::OrderNumberGeneratorDefaults
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderNumberGeneratorDefaults
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#min_hex_length ⇒ Object
readonly
Returns the value of attribute min_hex_length.
-
#min_starts_with ⇒ Object
readonly
Returns the value of attribute min_starts_with.
-
#starts_with ⇒ Object
readonly
Returns the value of attribute starts_with.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderNumberGeneratorDefaults
constructor
A new instance of OrderNumberGeneratorDefaults.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderNumberGeneratorDefaults
Returns a new instance of OrderNumberGeneratorDefaults.
41289 41290 41291 41292 41293 41294 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41289 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @starts_with = HttpClient::Preconditions.assert_class('starts_with', (x = opts.delete(:starts_with); x.nil? ? 1001 : x), Integer) @min_hex_length = HttpClient::Preconditions.assert_class('min_hex_length', (x = opts.delete(:min_hex_length); x.nil? ? 6 : x), Integer) @min_starts_with = HttpClient::Preconditions.assert_class('min_starts_with', (x = opts.delete(:min_starts_with); x.nil? ? 1 : x), Integer) end |
Instance Attribute Details
#min_hex_length ⇒ Object (readonly)
Returns the value of attribute min_hex_length.
41287 41288 41289 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41287 def min_hex_length @min_hex_length end |
#min_starts_with ⇒ Object (readonly)
Returns the value of attribute min_starts_with.
41287 41288 41289 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41287 def min_starts_with @min_starts_with end |
#starts_with ⇒ Object (readonly)
Returns the value of attribute starts_with.
41287 41288 41289 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41287 def starts_with @starts_with end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
41300 41301 41302 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41300 def copy(incoming={}) OrderNumberGeneratorDefaults.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
41304 41305 41306 41307 41308 41309 41310 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41304 def to_hash { :starts_with => starts_with, :min_hex_length => min_hex_length, :min_starts_with => min_starts_with } end |
#to_json ⇒ Object
41296 41297 41298 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41296 def to_json JSON.dump(to_hash) end |