Class: SpApiHelpers::PriceToEstimateFees

Inherits:
Object
  • Object
show all
Defined in:
lib/sp_api_helpers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(listing_price, currency_code = MoneyType::USD, shipping = nil, points = nil) ⇒ PriceToEstimateFees

Returns a new instance of PriceToEstimateFees.



59
60
61
62
63
# File 'lib/sp_api_helpers.rb', line 59

def initialize(listing_price, currency_code = MoneyType::USD, shipping = nil, points = nil)
  @listing_price = MoneyType.new(listing_price, currency_code)
  @shipping = MoneyType.new(shipping, currency_code) if shipping
  @points = points if points
end

Instance Attribute Details

#listing_priceObject

Returns the value of attribute listing_price.



57
58
59
# File 'lib/sp_api_helpers.rb', line 57

def listing_price
  @listing_price
end

#pointsObject

Returns the value of attribute points.



57
58
59
# File 'lib/sp_api_helpers.rb', line 57

def points
  @points
end

#shippingObject

Returns the value of attribute shipping.



57
58
59
# File 'lib/sp_api_helpers.rb', line 57

def shipping
  @shipping
end

Instance Method Details

#to_camelizeObject



65
66
67
# File 'lib/sp_api_helpers.rb', line 65

def to_camelize
  { "ListingPrice" => listing_price.to_camelize }
end