Class: Prodigi::QuoteResource
- Defined in:
- lib/prodigi/resources/quotes.rb
Overview
Resource class for creating price quotes via the Prodigi API
Provides methods for generating cost estimates for orders before they are created. Quotes include itemized costs, shipping costs, and fulfillment location information.
Constant Summary
Constants inherited from Resource
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
#default_headers, #delete_request, #get_request, #handle_response, #initialize, #patch_request, #post_request, #put_request
Constructor Details
This class inherits a constructor from Prodigi::Resource
Instance Method Details
#create(**attributes) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/prodigi/resources/quotes.rb', line 34 def create(**attributes) response = post_request("quotes", body: attributes) return unless response.body["outcome"] == "Created" Quote.new response.body end |