Class: Sendcloud::ShippingMethod
- Inherits:
-
Base
- Object
- Base
- Sendcloud::ShippingMethod
show all
- Defined in:
- lib/sendcloud/shipping_method.rb
Instance Attribute Summary
Attributes inherited from Base
#api_key, #api_secret
Instance Method Summary
collapse
Methods inherited from Base
#auth, #initialize
Instance Method Details
#get(shipping_id) ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/sendcloud/shipping_method.rb', line 10
def get(shipping_id)
response = self.class.get("/shipping_methods/#{shipping_id}", :basic_auth => auth)
if response["error"]
raise ShippingMethodException.new(response["error"]["message"])
end
response["shipping_method"]
end
|
#list ⇒ Object
5
6
7
8
|
# File 'lib/sendcloud/shipping_method.rb', line 5
def list
response = self.class.get("/shipping_methods", :basic_auth => auth)
response["shipping_methods"]
end
|