Class: SpApiHelpers::FeesEstimateRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(marketplace_id, price, currency_code, shipping, points, identifier, is_amazon_fulfilled, optional_fulfillment_program) ⇒ FeesEstimateRequest

Returns a new instance of FeesEstimateRequest.



36
37
38
39
40
41
42
43
# File 'lib/sp_api_helpers.rb', line 36

def initialize(marketplace_id, price, currency_code, shipping, points, identifier, is_amazon_fulfilled,
               optional_fulfillment_program)
  @marketplace_id = marketplace_id
  @price_to_estimate_fees = PriceToEstimateFees.new(price, currency_code, shipping, points)
  @identifier = identifier
  @is_amazon_fulfilled = is_amazon_fulfilled
  @optional_fulfillment_program = optional_fulfillment_program if is_amazon_fulfilled
end

Instance Attribute Details

#identifierObject

Returns the value of attribute identifier.



33
34
35
# File 'lib/sp_api_helpers.rb', line 33

def identifier
  @identifier
end

#is_amazon_fulfilledObject

Returns the value of attribute is_amazon_fulfilled.



33
34
35
# File 'lib/sp_api_helpers.rb', line 33

def is_amazon_fulfilled
  @is_amazon_fulfilled
end

#marketplace_idObject

Returns the value of attribute marketplace_id.



33
34
35
# File 'lib/sp_api_helpers.rb', line 33

def marketplace_id
  @marketplace_id
end

#optional_fulfillment_programObject

Returns the value of attribute optional_fulfillment_program.



33
34
35
# File 'lib/sp_api_helpers.rb', line 33

def optional_fulfillment_program
  @optional_fulfillment_program
end

#price_to_estimate_feesObject

Returns the value of attribute price_to_estimate_fees.



33
34
35
# File 'lib/sp_api_helpers.rb', line 33

def price_to_estimate_fees
  @price_to_estimate_fees
end

Instance Method Details

#to_camelizeObject



45
46
47
48
49
50
51
52
53
# File 'lib/sp_api_helpers.rb', line 45

def to_camelize
  {
    "Identifier" => identifier,
    "IsAmazonFulfilled" => is_amazon_fulfilled,
    "MarketplaceId" => marketplace_id,
    "OptionalFulfillmentProgram" => optional_fulfillment_program,
    "PriceToEstimateFees" => price_to_estimate_fees.to_camelize
  }
end