Class: Deliveries::Couriers::CorreosExpress::Pickups::CutoffTime::FormatParams
- Inherits:
-
Object
- Object
- Deliveries::Couriers::CorreosExpress::Pickups::CutoffTime::FormatParams
- Defined in:
- lib/deliveries/couriers/correos_express/pickups/cutoff_time/format_params.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
Returns the value of attribute country.
-
#postcode ⇒ Object
Returns the value of attribute postcode.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(country:, postcode:) ⇒ FormatParams
constructor
A new instance of FormatParams.
Constructor Details
#initialize(country:, postcode:) ⇒ FormatParams
Returns a new instance of FormatParams.
9 10 11 12 |
# File 'lib/deliveries/couriers/correos_express/pickups/cutoff_time/format_params.rb', line 9 def initialize(country:, postcode:) self.country = country self.postcode = postcode end |
Instance Attribute Details
#country ⇒ Object
Returns the value of attribute country.
7 8 9 |
# File 'lib/deliveries/couriers/correos_express/pickups/cutoff_time/format_params.rb', line 7 def country @country end |
#postcode ⇒ Object
Returns the value of attribute postcode.
7 8 9 |
# File 'lib/deliveries/couriers/correos_express/pickups/cutoff_time/format_params.rb', line 7 def postcode @postcode end |
Instance Method Details
#execute ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/deliveries/couriers/correos_express/pickups/cutoff_time/format_params.rb', line 14 def execute params = { strCP: postcode, strPais: country_code_to_id(country) } params.to_json end |