Class: SolidusEasypost::ReturnAuthorization
- Inherits:
-
Object
- Object
- SolidusEasypost::ReturnAuthorization
- Extended by:
- Forwardable
- Defined in:
- app/models/solidus_easypost/return_authorization.rb
Instance Attribute Summary collapse
-
#return_authorization ⇒ Object
readonly
Returns the value of attribute return_authorization.
Instance Method Summary collapse
- #easypost_shipment ⇒ Object
-
#initialize(return_authorization) ⇒ ReturnAuthorization
constructor
A new instance of ReturnAuthorization.
- #return_label(rate) ⇒ Object
Constructor Details
#initialize(return_authorization) ⇒ ReturnAuthorization
Returns a new instance of ReturnAuthorization.
13 14 15 |
# File 'app/models/solidus_easypost/return_authorization.rb', line 13 def initialize() @return_authorization = end |
Instance Attribute Details
#return_authorization ⇒ Object (readonly)
Returns the value of attribute return_authorization.
9 10 11 |
# File 'app/models/solidus_easypost/return_authorization.rb', line 9 def @return_authorization end |
Instance Method Details
#easypost_shipment ⇒ Object
17 18 19 |
# File 'app/models/solidus_easypost/return_authorization.rb', line 17 def easypost_shipment @easypost_shipment ||= ShipmentBuilder.(self) end |
#return_label(rate) ⇒ Object
21 22 23 24 25 |
# File 'app/models/solidus_easypost/return_authorization.rb', line 21 def return_label(rate) easypost_shipment.buy(rate) unless easypost_shipment.postage_label easypost_shipment.postage_label end |