Class: NewStoreApi::PutRoutingRulesetResponse1

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/new_store_api/models/put_routing_ruleset_response1.rb

Overview

PutRoutingRulesetResponse1 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(fulfillment_config_uri = SKIP, routing_ruleset = SKIP) ⇒ PutRoutingRulesetResponse1

Returns a new instance of PutRoutingRulesetResponse1.



41
42
43
44
# File 'lib/new_store_api/models/put_routing_ruleset_response1.rb', line 41

def initialize(fulfillment_config_uri = SKIP, routing_ruleset = SKIP)
  @fulfillment_config_uri = fulfillment_config_uri unless fulfillment_config_uri == SKIP
  @routing_ruleset = routing_ruleset unless routing_ruleset == SKIP
end

Instance Attribute Details

#fulfillment_config_uriString

Fulfillment Configuration Revision URI

Returns:

  • (String)


14
15
16
# File 'lib/new_store_api/models/put_routing_ruleset_response1.rb', line 14

def fulfillment_config_uri
  @fulfillment_config_uri
end

#routing_rulesetRoutingRuleset

Fulfillment Configuration Revision URI

Returns:



18
19
20
# File 'lib/new_store_api/models/put_routing_ruleset_response1.rb', line 18

def routing_ruleset
  @routing_ruleset
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/new_store_api/models/put_routing_ruleset_response1.rb', line 47

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  fulfillment_config_uri =
    hash.key?('fulfillment_config_uri') ? hash['fulfillment_config_uri'] : SKIP
  routing_ruleset = RoutingRuleset.from_hash(hash['routing_ruleset']) if
    hash['routing_ruleset']

  # Create object from extracted values.
  PutRoutingRulesetResponse1.new(fulfillment_config_uri,
                                 routing_ruleset)
end

.namesObject

A mapping from model property names to API property names.



21
22
23
24
25
26
# File 'lib/new_store_api/models/put_routing_ruleset_response1.rb', line 21

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['fulfillment_config_uri'] = 'fulfillment_config_uri'
  @_hash['routing_ruleset'] = 'routing_ruleset'
  @_hash
end

.nullablesObject

An array for nullable fields



37
38
39
# File 'lib/new_store_api/models/put_routing_ruleset_response1.rb', line 37

def self.nullables
  []
end

.optionalsObject

An array for optional fields



29
30
31
32
33
34
# File 'lib/new_store_api/models/put_routing_ruleset_response1.rb', line 29

def self.optionals
  %w[
    fulfillment_config_uri
    routing_ruleset
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



69
70
71
72
73
# File 'lib/new_store_api/models/put_routing_ruleset_response1.rb', line 69

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} fulfillment_config_uri: #{@fulfillment_config_uri.inspect},"\
  " routing_ruleset: #{@routing_ruleset.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



62
63
64
65
66
# File 'lib/new_store_api/models/put_routing_ruleset_response1.rb', line 62

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} fulfillment_config_uri: #{@fulfillment_config_uri}, routing_ruleset:"\
  " #{@routing_ruleset}>"
end