Class: ShippingQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/objects/shipping_query.rb

Overview

This object contains information about an incoming shipping query.

Instance Method Summary collapse

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

#fromObject

User who sent the query.



19
20
21
# File 'lib/objects/shipping_query.rb', line 19

def from
  User.new(@query.from)
end

#idObject

Unique query identifier.



14
15
16
# File 'lib/objects/shipping_query.rb', line 14

def id
  @query.id
end

#invoice_payloadObject

Bot specified invoice payload.



24
25
26
# File 'lib/objects/shipping_query.rb', line 24

def invoice_payload
  @query.invoice_payload
end

#shipping_addressObject

User specified shipping address.



29
30
31
# File 'lib/objects/shipping_query.rb', line 29

def shipping_address
  ShippingAddress.new(@query.shipping_address)
end