Class: ShippingQuery
- Inherits:
-
Object
- Object
- ShippingQuery
- Defined in:
- lib/objects/shipping_query.rb
Overview
This object contains information about an incoming shipping query.
Instance Method Summary collapse
-
#from ⇒ Object
User who sent the query.
-
#id ⇒ Object
Unique query identifier.
-
#initialize(query) ⇒ ShippingQuery
constructor
:nodoc:.
-
#invoice_payload ⇒ Object
Bot specified invoice payload.
-
#shipping_address ⇒ Object
User specified shipping address.
Constructor Details
#initialize(query) ⇒ ShippingQuery
:nodoc:
9 10 11 |
# File 'lib/objects/shipping_query.rb', line 9 def initialize(query) # :nodoc: @query = query end |
Instance Method Details
#from ⇒ Object
User who sent the query.
19 20 21 |
# File 'lib/objects/shipping_query.rb', line 19 def from User.new(@query.from) end |
#id ⇒ Object
Unique query identifier.
14 15 16 |
# File 'lib/objects/shipping_query.rb', line 14 def id @query.id end |
#invoice_payload ⇒ Object
Bot specified invoice payload.
24 25 26 |
# File 'lib/objects/shipping_query.rb', line 24 def invoice_payload @query.invoice_payload end |
#shipping_address ⇒ Object
User specified shipping address.
29 30 31 |
# File 'lib/objects/shipping_query.rb', line 29 def shipping_address ShippingAddress.new(@query.shipping_address) end |