Class: ShippingScale::Packaging

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

Direct Known Subclasses

Package, Shipment

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#packagesObject

Returns the value of attribute packages.



3
4
5
# File 'lib/shipping_scale/packaging/packaging.rb', line 3

def packages
  @packages
end

#responseObject

Returns the value of attribute response.



3
4
5
# File 'lib/shipping_scale/packaging/packaging.rb', line 3

def response
  @response
end

Instance Method Details

#detailsObject



14
15
16
# File 'lib/shipping_scale/packaging/packaging.rb', line 14

def details
  response.details
end

#get_price!(options = {}) ⇒ Object



5
6
7
8
# File 'lib/shipping_scale/packaging/packaging.rb', line 5

def get_price!(options = {})
  ShippingScale::Request.config(options)
  @response = ShippingScale::Request.new(packages: packages).send!     
end

#priceObject



10
11
12
# File 'lib/shipping_scale/packaging/packaging.rb', line 10

def price
  response.price
end