Class: FriendlyShipping::Services::UpsJson::TimingsOptions
- Inherits:
-
Object
- Object
- FriendlyShipping::Services::UpsJson::TimingsOptions
- Defined in:
- lib/friendly_shipping/services/ups_json/timings_options.rb
Overview
Options for getting timing information from UPS
Instance Attribute Summary collapse
-
#customer_context ⇒ Object
readonly
Returns the value of attribute customer_context.
-
#customer_context A string to connect request and response in the calling code(Astringtoconnectrequest) ⇒ Object
readonly
Options for getting timing information from UPS.
-
#documents_only ⇒ Object
readonly
Returns the value of attribute documents_only.
-
#invoice_total ⇒ Object
readonly
Returns the value of attribute invoice_total.
-
#pickup ⇒ Object
readonly
Returns the value of attribute pickup.
Instance Method Summary collapse
-
#documents_only Does the shipment only contain documents?=(Doestheshipmentonlycontaindocuments? = (value)) ⇒ Object
Options for getting timing information from UPS.
-
#initialize(pickup: Time.now, invoice_total: Money.new(5000, 'USD'), documents_only: false, customer_context: nil) ⇒ TimingsOptions
constructor
A new instance of TimingsOptions.
-
#invoice_total How much the items in the shipment are worth=(Howmuchtheitems) ⇒ Object
As this is not super important for getting timing information, we use a default value of 50 USD here.
-
#pickup When the shipment will be picked up=(Whentheshipmentwillbepickedup = (value)) ⇒ Object
Options for getting timing information from UPS.
Constructor Details
#initialize(pickup: Time.now, invoice_total: Money.new(5000, 'USD'), documents_only: false, customer_context: nil) ⇒ TimingsOptions
Returns a new instance of TimingsOptions.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/friendly_shipping/services/ups_json/timings_options.rb', line 19 def initialize( pickup: Time.now, invoice_total: Money.new(5000, 'USD'), documents_only: false, customer_context: nil ) @pickup = pickup @invoice_total = invoice_total @documents_only = documents_only @customer_context = customer_context end |
Instance Attribute Details
#customer_context ⇒ Object (readonly)
Returns the value of attribute customer_context.
14 15 16 |
# File 'lib/friendly_shipping/services/ups_json/timings_options.rb', line 14 def customer_context @customer_context end |
#customer_context A string to connect request and response in the calling code(Astringtoconnectrequest) ⇒ Object (readonly)
Options for getting timing information from UPS
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/friendly_shipping/services/ups_json/timings_options.rb', line 13 class TimingsOptions attr_reader :pickup, :invoice_total, :documents_only, :customer_context def initialize( pickup: Time.now, invoice_total: Money.new(5000, 'USD'), documents_only: false, customer_context: nil ) @pickup = pickup @invoice_total = invoice_total @documents_only = documents_only @customer_context = customer_context end end |
#documents_only ⇒ Object (readonly)
Returns the value of attribute documents_only.
14 15 16 |
# File 'lib/friendly_shipping/services/ups_json/timings_options.rb', line 14 def documents_only @documents_only end |
#invoice_total ⇒ Object (readonly)
Returns the value of attribute invoice_total.
14 15 16 |
# File 'lib/friendly_shipping/services/ups_json/timings_options.rb', line 14 def invoice_total @invoice_total end |
#pickup ⇒ Object (readonly)
Returns the value of attribute pickup.
14 15 16 |
# File 'lib/friendly_shipping/services/ups_json/timings_options.rb', line 14 def pickup @pickup end |
Instance Method Details
#documents_only Does the shipment only contain documents?=(Doestheshipmentonlycontaindocuments? = (value)) ⇒ Object
Options for getting timing information from UPS
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/friendly_shipping/services/ups_json/timings_options.rb', line 13 class TimingsOptions attr_reader :pickup, :invoice_total, :documents_only, :customer_context def initialize( pickup: Time.now, invoice_total: Money.new(5000, 'USD'), documents_only: false, customer_context: nil ) @pickup = pickup @invoice_total = invoice_total @documents_only = documents_only @customer_context = customer_context end end |
#invoice_total How much the items in the shipment are worth=(Howmuchtheitems) ⇒ Object
As this is not super important for getting timing information, we use a default value of 50 USD here.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/friendly_shipping/services/ups_json/timings_options.rb', line 13 class TimingsOptions attr_reader :pickup, :invoice_total, :documents_only, :customer_context def initialize( pickup: Time.now, invoice_total: Money.new(5000, 'USD'), documents_only: false, customer_context: nil ) @pickup = pickup @invoice_total = invoice_total @documents_only = documents_only @customer_context = customer_context end end |
#pickup When the shipment will be picked up=(Whentheshipmentwillbepickedup = (value)) ⇒ Object
Options for getting timing information from UPS
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/friendly_shipping/services/ups_json/timings_options.rb', line 13 class TimingsOptions attr_reader :pickup, :invoice_total, :documents_only, :customer_context def initialize( pickup: Time.now, invoice_total: Money.new(5000, 'USD'), documents_only: false, customer_context: nil ) @pickup = pickup @invoice_total = invoice_total @documents_only = documents_only @customer_context = customer_context end end |