Class: TinyErpApi::Shipment
- Inherits:
-
Object
- Object
- TinyErpApi::Shipment
- Defined in:
- lib/tiny_erp_api/shipment.rb
Instance Attribute Summary collapse
-
#codigo_rastreamento ⇒ Object
readonly
Returns the value of attribute codigo_rastreamento.
-
#frete_por_conta ⇒ Object
readonly
Returns the value of attribute frete_por_conta.
-
#id_forma_envio ⇒ Object
readonly
Returns the value of attribute id_forma_envio.
-
#id_forma_frete ⇒ Object
readonly
Returns the value of attribute id_forma_frete.
-
#id_transportador ⇒ Object
readonly
Returns the value of attribute id_transportador.
-
#url_rastreamento ⇒ Object
readonly
Returns the value of attribute url_rastreamento.
Instance Method Summary collapse
-
#initialize(id_transportador: nil, frete_por_conta: nil, id_forma_envio: nil, id_forma_frete: nil, codigo_rastreamento: nil, url_rastreamento: nil) ⇒ Shipment
constructor
A new instance of Shipment.
- #to_api_hash ⇒ Object
Constructor Details
#initialize(id_transportador: nil, frete_por_conta: nil, id_forma_envio: nil, id_forma_frete: nil, codigo_rastreamento: nil, url_rastreamento: nil) ⇒ Shipment
Returns a new instance of Shipment.
5 6 7 8 9 10 11 12 |
# File 'lib/tiny_erp_api/shipment.rb', line 5 def initialize(id_transportador: nil, frete_por_conta: nil, id_forma_envio: nil, id_forma_frete: nil, codigo_rastreamento: nil, url_rastreamento: nil) @id_transportador = id_transportador @frete_por_conta = frete_por_conta @id_forma_envio = id_forma_envio @id_forma_frete = id_forma_frete @codigo_rastreamento = codigo_rastreamento @url_rastreamento = url_rastreamento end |
Instance Attribute Details
#codigo_rastreamento ⇒ Object (readonly)
Returns the value of attribute codigo_rastreamento.
4 5 6 |
# File 'lib/tiny_erp_api/shipment.rb', line 4 def codigo_rastreamento @codigo_rastreamento end |
#frete_por_conta ⇒ Object (readonly)
Returns the value of attribute frete_por_conta.
4 5 6 |
# File 'lib/tiny_erp_api/shipment.rb', line 4 def frete_por_conta @frete_por_conta end |
#id_forma_envio ⇒ Object (readonly)
Returns the value of attribute id_forma_envio.
4 5 6 |
# File 'lib/tiny_erp_api/shipment.rb', line 4 def id_forma_envio @id_forma_envio end |
#id_forma_frete ⇒ Object (readonly)
Returns the value of attribute id_forma_frete.
4 5 6 |
# File 'lib/tiny_erp_api/shipment.rb', line 4 def id_forma_frete @id_forma_frete end |
#id_transportador ⇒ Object (readonly)
Returns the value of attribute id_transportador.
4 5 6 |
# File 'lib/tiny_erp_api/shipment.rb', line 4 def id_transportador @id_transportador end |
#url_rastreamento ⇒ Object (readonly)
Returns the value of attribute url_rastreamento.
4 5 6 |
# File 'lib/tiny_erp_api/shipment.rb', line 4 def url_rastreamento @url_rastreamento end |
Instance Method Details
#to_api_hash ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/tiny_erp_api/shipment.rb', line 14 def to_api_hash { id: id_transportador, fretePorConta: frete_por_conta, formaEnvio: { id: id_forma_envio }, formaFrete: { id: id_forma_frete }, codigoRastreamento: codigo_rastreamento, urlRastreamento: url_rastreamento } end |