Class: WalmartApIs::FeesEstimateIdentifier
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- WalmartApIs::FeesEstimateIdentifier
- Defined in:
- lib/walmart_ap_is/models/fees_estimate_identifier.rb
Overview
Echoes back the item identifier and request parameters that produced this result. Mirrors SP-API FeesEstimateIdentifier.
Instance Attribute Summary collapse
-
#id_type ⇒ IdType1
TODO: Write general description for this method.
-
#id_value ⇒ String
TODO: Write general description for this method.
-
#is_walmart_fulfilled ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#marketplace_id ⇒ String
TODO: Write general description for this method.
-
#optional_fulfillment_program ⇒ String
Echoed from the request Identifier field.
-
#price_to_estimate_fees ⇒ PriceToEstimateFees
Price information used to estimate fees.
-
#seller_id ⇒ String
Price information used to estimate fees.
-
#seller_input_identifier ⇒ String
Echoed from the request Identifier field.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(marketplace_id: SKIP, id_type: SKIP, id_value: SKIP, is_walmart_fulfilled: SKIP, price_to_estimate_fees: SKIP, seller_id: SKIP, seller_input_identifier: SKIP, optional_fulfillment_program: SKIP, additional_properties: nil) ⇒ FeesEstimateIdentifier
constructor
A new instance of FeesEstimateIdentifier.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(marketplace_id: SKIP, id_type: SKIP, id_value: SKIP, is_walmart_fulfilled: SKIP, price_to_estimate_fees: SKIP, seller_id: SKIP, seller_input_identifier: SKIP, optional_fulfillment_program: SKIP, additional_properties: nil) ⇒ FeesEstimateIdentifier
Returns a new instance of FeesEstimateIdentifier.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 78 def initialize(marketplace_id: SKIP, id_type: SKIP, id_value: SKIP, is_walmart_fulfilled: SKIP, price_to_estimate_fees: SKIP, seller_id: SKIP, seller_input_identifier: SKIP, optional_fulfillment_program: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @marketplace_id = marketplace_id unless marketplace_id == SKIP @id_type = id_type unless id_type == SKIP @id_value = id_value unless id_value == SKIP @is_walmart_fulfilled = is_walmart_fulfilled unless is_walmart_fulfilled == SKIP @price_to_estimate_fees = price_to_estimate_fees unless price_to_estimate_fees == SKIP @seller_id = seller_id unless seller_id == SKIP @seller_input_identifier = seller_input_identifier unless seller_input_identifier == SKIP unless optional_fulfillment_program == SKIP @optional_fulfillment_program = optional_fulfillment_program end @additional_properties = additional_properties end |
Instance Attribute Details
#id_type ⇒ IdType1
TODO: Write general description for this method
19 20 21 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 19 def id_type @id_type end |
#id_value ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 23 def id_value @id_value end |
#is_walmart_fulfilled ⇒ TrueClass | FalseClass
TODO: Write general description for this method
27 28 29 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 27 def is_walmart_fulfilled @is_walmart_fulfilled end |
#marketplace_id ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 15 def marketplace_id @marketplace_id end |
#optional_fulfillment_program ⇒ String
Echoed from the request Identifier field.
43 44 45 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 43 def optional_fulfillment_program @optional_fulfillment_program end |
#price_to_estimate_fees ⇒ PriceToEstimateFees
Price information used to estimate fees.
31 32 33 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 31 def price_to_estimate_fees @price_to_estimate_fees end |
#seller_id ⇒ String
Price information used to estimate fees.
35 36 37 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 35 def seller_id @seller_id end |
#seller_input_identifier ⇒ String
Echoed from the request Identifier field.
39 40 41 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 39 def seller_input_identifier @seller_input_identifier end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 101 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. marketplace_id = hash.key?('MarketplaceId') ? hash['MarketplaceId'] : SKIP id_type = hash.key?('IdType') ? hash['IdType'] : SKIP id_value = hash.key?('IdValue') ? hash['IdValue'] : SKIP is_walmart_fulfilled = hash.key?('IsWalmartFulfilled') ? hash['IsWalmartFulfilled'] : SKIP price_to_estimate_fees = PriceToEstimateFees.from_hash(hash['PriceToEstimateFees']) if hash['PriceToEstimateFees'] seller_id = hash.key?('SellerId') ? hash['SellerId'] : SKIP seller_input_identifier = hash.key?('SellerInputIdentifier') ? hash['SellerInputIdentifier'] : SKIP optional_fulfillment_program = hash.key?('OptionalFulfillmentProgram') ? hash['OptionalFulfillmentProgram'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. FeesEstimateIdentifier.new(marketplace_id: marketplace_id, id_type: id_type, id_value: id_value, is_walmart_fulfilled: is_walmart_fulfilled, price_to_estimate_fees: price_to_estimate_fees, seller_id: seller_id, seller_input_identifier: seller_input_identifier, optional_fulfillment_program: optional_fulfillment_program, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['marketplace_id'] = 'MarketplaceId' @_hash['id_type'] = 'IdType' @_hash['id_value'] = 'IdValue' @_hash['is_walmart_fulfilled'] = 'IsWalmartFulfilled' @_hash['price_to_estimate_fees'] = 'PriceToEstimateFees' @_hash['seller_id'] = 'SellerId' @_hash['seller_input_identifier'] = 'SellerInputIdentifier' @_hash['optional_fulfillment_program'] = 'OptionalFulfillmentProgram' @_hash end |
.nullables ⇒ Object
An array for nullable fields
74 75 76 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 74 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 60 def self.optionals %w[ marketplace_id id_type id_value is_walmart_fulfilled price_to_estimate_fees seller_id seller_input_identifier optional_fulfillment_program ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
148 149 150 151 152 153 154 155 156 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 148 def inspect class_name = self.class.name.split('::').last "<#{class_name} marketplace_id: #{@marketplace_id.inspect}, id_type: #{@id_type.inspect},"\ " id_value: #{@id_value.inspect}, is_walmart_fulfilled: #{@is_walmart_fulfilled.inspect},"\ " price_to_estimate_fees: #{@price_to_estimate_fees.inspect}, seller_id:"\ " #{@seller_id.inspect}, seller_input_identifier: #{@seller_input_identifier.inspect},"\ " optional_fulfillment_program: #{@optional_fulfillment_program.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
138 139 140 141 142 143 144 145 |
# File 'lib/walmart_ap_is/models/fees_estimate_identifier.rb', line 138 def to_s class_name = self.class.name.split('::').last "<#{class_name} marketplace_id: #{@marketplace_id}, id_type: #{@id_type}, id_value:"\ " #{@id_value}, is_walmart_fulfilled: #{@is_walmart_fulfilled}, price_to_estimate_fees:"\ " #{@price_to_estimate_fees}, seller_id: #{@seller_id}, seller_input_identifier:"\ " #{@seller_input_identifier}, optional_fulfillment_program:"\ " #{@optional_fulfillment_program}, additional_properties: #{@additional_properties}>" end |