Class: Oshpark::Address
- Inherits:
-
Object
- Object
- Oshpark::Address
- Includes:
- Model
- Defined in:
- lib/oshpark/address.rb
Constant Summary collapse
- REQUIRED_ARGS =
%w|name address_line_1 address_line_2 city country|
Class Method Summary collapse
Instance Method Summary collapse
- #available_shipping_rates ⇒ Object
-
#initialize(args = {}) ⇒ Address
constructor
A new instance of Address.
- #to_h ⇒ Object
Methods included from Model
Constructor Details
#initialize(args = {}) ⇒ Address
Returns a new instance of Address.
12 13 14 15 16 17 |
# File 'lib/oshpark/address.rb', line 12 def initialize args={} clean_json args do |json| check_args json reload_with json end end |
Class Method Details
.attrs ⇒ Object
4 5 6 |
# File 'lib/oshpark/address.rb', line 4 def self.attrs %w| name company_name address_line_1 address_line_2 city state zip_or_postal_code country phone_number is_business | end |
Instance Method Details
#available_shipping_rates ⇒ Object
27 28 29 |
# File 'lib/oshpark/address.rb', line 27 def available_shipping_rates ShippingRate.rates_for_address self end |