class Beaver::ItemResp
ItemResp
Model.
Attributes
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [CurrencyNullableEnum]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [OwnerOfItems]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [List of String]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Object]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [List of String]
TODO: Write general description for this method @return [StateEnum]
TODO: Write general description for this method @return [TermsNullable]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Weight]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/beaver/models/item_resp.rb, line 151 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. create_time = hash['create_time'] id = hash['id'] owner = OwnerOfItems.from_hash(hash['owner']) if hash['owner'] path = hash['path'] product_name = hash['product_name'] resource = hash['resource'] state = hash['state'] currency = hash['currency'] description = hash['description'] photos = hash['photos'] price = hash['price'] product_code = hash['product_code'] product_details = hash['product_details'] reference_number = hash['reference_number'] shipping_options = hash['shipping_options'] terms = TermsNullable.from_hash(hash['terms']) if hash['terms'] uri = hash['uri'] weight = Weight.from_hash(hash['weight']) if hash['weight'] api_version = hash['api_version'] # Create object from extracted values. ItemResp.new(create_time, id, owner, path, product_name, resource, state, currency, description, photos, price, product_code, product_details, reference_number, shipping_options, terms, uri, weight, api_version) end
A mapping from model property names to API property names.
# File lib/beaver/models/item_resp.rb, line 86 def self.names @_hash = {} if @_hash.nil? @_hash['create_time'] = 'create_time' @_hash['currency'] = 'currency' @_hash['description'] = 'description' @_hash['id'] = 'id' @_hash['owner'] = 'owner' @_hash['path'] = 'path' @_hash['photos'] = 'photos' @_hash['price'] = 'price' @_hash['product_code'] = 'product_code' @_hash['product_details'] = 'product_details' @_hash['product_name'] = 'product_name' @_hash['reference_number'] = 'reference_number' @_hash['resource'] = 'resource' @_hash['shipping_options'] = 'shipping_options' @_hash['state'] = 'state' @_hash['terms'] = 'terms' @_hash['uri'] = 'uri' @_hash['weight'] = 'weight' @_hash['api_version'] = 'api_version' @_hash end
# File lib/beaver/models/item_resp.rb, line 110 def initialize(create_time = nil, id = nil, owner = nil, path = nil, product_name = nil, resource = nil, state = nil, currency = nil, description = nil, photos = nil, price = nil, product_code = nil, product_details = nil, reference_number = nil, shipping_options = nil, terms = nil, uri = nil, weight = nil, api_version = nil) @create_time = create_time @currency = currency @description = description @id = id @owner = owner @path = path @photos = photos @price = price @product_code = product_code @product_details = product_details @product_name = product_name @reference_number = reference_number @resource = resource @shipping_options = shipping_options @state = state @terms = terms @uri = uri @weight = weight @api_version = api_version end