Class: Printful::ShippingRatesResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/printful/resources/shipping_rates.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Printful::Resource

Instance Method Details

#calculate(**params) ⇒ Object



4
5
6
7
8
# File 'lib/printful/resources/shipping_rates.rb', line 4

def calculate(**params)
  response = post_request("shipping/rates", body: params)
  body = response.body["result"]
  Collection.from_response(body: body, type: ShippingRate)
end