Class: CorreiosApi::PreShipping
- Inherits:
-
Object
- Object
- CorreiosApi::PreShipping
- Defined in:
- lib/correios_api/pre_shipping.rb
Instance Attribute Summary collapse
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#label_type ⇒ Object
readonly
Returns the value of attribute label_type.
-
#package_type ⇒ Object
readonly
Returns the value of attribute package_type.
-
#payment_method_id ⇒ Object
readonly
Returns the value of attribute payment_method_id.
-
#post_prevision ⇒ Object
readonly
Returns the value of attribute post_prevision.
-
#posting_deadline ⇒ Object
readonly
Returns the value of attribute posting_deadline.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#service_code ⇒ Object
readonly
Returns the value of attribute service_code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_detail ⇒ Object
readonly
Returns the value of attribute status_detail.
-
#tracking_code ⇒ Object
readonly
Returns the value of attribute tracking_code.
Instance Method Summary collapse
-
#initialize(response) ⇒ PreShipping
constructor
A new instance of PreShipping.
Constructor Details
#initialize(response) ⇒ PreShipping
Returns a new instance of PreShipping.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/correios_api/pre_shipping.rb', line 4 def initialize response @response = response @external_id = response.id @tracking_code = response.codigoObjeto @service_code = response.codigoServico @payment_method_id = response.modalidadePagamento @price = response.precoPrePostagem @items = response.itensDeclaracaoConteudo @post_prevision = response.dataPrevistaPostagem @posting_deadline = response.prazoPostagem @status = response.statusAtual @status_detail = response.descStatusAtual @label_type = response.tipoRotulo @package_type = response.tipoObjeto end |
Instance Attribute Details
#external_id ⇒ Object (readonly)
Returns the value of attribute external_id.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def external_id @external_id end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def items @items end |
#label_type ⇒ Object (readonly)
Returns the value of attribute label_type.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def label_type @label_type end |
#package_type ⇒ Object (readonly)
Returns the value of attribute package_type.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def package_type @package_type end |
#payment_method_id ⇒ Object (readonly)
Returns the value of attribute payment_method_id.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def payment_method_id @payment_method_id end |
#post_prevision ⇒ Object (readonly)
Returns the value of attribute post_prevision.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def post_prevision @post_prevision end |
#posting_deadline ⇒ Object (readonly)
Returns the value of attribute posting_deadline.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def posting_deadline @posting_deadline end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def price @price end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def response @response end |
#service_code ⇒ Object (readonly)
Returns the value of attribute service_code.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def service_code @service_code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def status @status end |
#status_detail ⇒ Object (readonly)
Returns the value of attribute status_detail.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def status_detail @status_detail end |
#tracking_code ⇒ Object (readonly)
Returns the value of attribute tracking_code.
3 4 5 |
# File 'lib/correios_api/pre_shipping.rb', line 3 def tracking_code @tracking_code end |