Class: Lucid::Shopify::ActivateCharge
- Inherits:
-
Object
- Object
- Lucid::Shopify::ActivateCharge
- Defined in:
- lib/lucid/shopify/activate_charge.rb
Instance Method Summary collapse
-
#call(credentials, charge) ⇒ Hash
Activate a recurring application charge.
-
#initialize(client: Container[:client]) ⇒ ActivateCharge
constructor
A new instance of ActivateCharge.
Constructor Details
#initialize(client: Container[:client]) ⇒ ActivateCharge
Returns a new instance of ActivateCharge.
9 10 11 |
# File 'lib/lucid/shopify/activate_charge.rb', line 9 def initialize(client: Container[:client]) @client = client end |
Instance Method Details
#call(credentials, charge) ⇒ Hash
Activate a recurring application charge.
19 20 21 22 23 |
# File 'lib/lucid/shopify/activate_charge.rb', line 19 def call(credentials, charge) data = @client.post_json(credentials, "recurring_application_charges/#{charge.to_h['id']}/activate", charge.to_h) data['recurring_application_charge'] end |