Class: Toptranslation::Resource::Quote
- Inherits:
-
Object
- Object
- Toptranslation::Resource::Quote
- Defined in:
- lib/toptranslation/resource/quote.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#estimated_delivery_date ⇒ Object
readonly
Returns the value of attribute estimated_delivery_date.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#product ⇒ Object
readonly
Returns the value of attribute product.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #accept ⇒ Object
-
#initialize(connection, options = {}) ⇒ Quote
constructor
A new instance of Quote.
- #reject(reason = nil) ⇒ Object
Constructor Details
#initialize(connection, options = {}) ⇒ Quote
Returns a new instance of Quote.
6 7 8 9 10 |
# File 'lib/toptranslation/resource/quote.rb', line 6 def initialize(connection, = {}) @connection = connection @options = update_from_response() end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/toptranslation/resource/quote.rb', line 3 def created_at @created_at end |
#estimated_delivery_date ⇒ Object (readonly)
Returns the value of attribute estimated_delivery_date.
3 4 5 |
# File 'lib/toptranslation/resource/quote.rb', line 3 def estimated_delivery_date @estimated_delivery_date end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
3 4 5 |
# File 'lib/toptranslation/resource/quote.rb', line 3 def identifier @identifier end |
#product ⇒ Object (readonly)
Returns the value of attribute product.
3 4 5 |
# File 'lib/toptranslation/resource/quote.rb', line 3 def product @product end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3 4 5 |
# File 'lib/toptranslation/resource/quote.rb', line 3 def state @state end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/toptranslation/resource/quote.rb', line 3 def value @value end |
Instance Method Details
#accept ⇒ Object
12 13 14 |
# File 'lib/toptranslation/resource/quote.rb', line 12 def accept @connection.patch("/quotes/#{identifier}/accept", version: 2) end |
#reject(reason = nil) ⇒ Object
16 17 18 |
# File 'lib/toptranslation/resource/quote.rb', line 16 def reject(reason = nil) @connection.patch("/quotes/#{identifier}/reject", reason: reason, version: 2) end |