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