Module: AcceptOn::API::Querying
Instance Method Summary collapse
-
#charge(id) ⇒ AcceptOn::Charge
Retrieves a charge from the API.
-
#charges(args = {}) ⇒ AcceptOn::Charge
Retrieves a page of charges from the API.
-
#plan(id) ⇒ AcceptOn::Plan
Retrieves a plan from the API.
-
#plans(args = {}) ⇒ AcceptOn::Plan
Retrieves a list of all plans from the API.
-
#promo_code(name) ⇒ AcceptOn::PromoCode
Retrieves a promo code from AcceptOn.
-
#promo_codes(args = {}) ⇒ Array<AcceptOn::PromoCode>
Retrieves a page of promo codes from AcceptOn.
-
#subscription(id) ⇒ AcceptOn::Subscription
Retrieves a subscription from AcceptOn.
-
#subscriptions(args = {}) ⇒ AcceptOn::Subscription
Retrieves a page of subscriptions from AcceptOn.
-
#token(id) ⇒ AcceptOn::TransactionToken
Retrieves a transaction token from the API.
Instance Method Details
#charge(id) ⇒ AcceptOn::Charge
Retrieves a charge from the API
16 17 18 |
# File 'lib/accepton/api/querying.rb', line 16 def charge(id) perform_get_with_object("/v1/charges/#{id}", {}, AcceptOn::Charge) end |
#charges(args = {}) ⇒ AcceptOn::Charge
Retrieves a page of charges from the API
34 35 36 |
# File 'lib/accepton/api/querying.rb', line 34 def charges(args = {}) perform_get_with_objects('/v1/charges', args, AcceptOn::Charge) end |
#plan(id) ⇒ AcceptOn::Plan
Retrieves a plan from the API
46 47 48 |
# File 'lib/accepton/api/querying.rb', line 46 def plan(id) perform_get_with_object("/v1/plans/#{id}", {}, AcceptOn::Plan) end |
#plans(args = {}) ⇒ AcceptOn::Plan
Retrieves a list of all plans from the API
63 64 65 |
# File 'lib/accepton/api/querying.rb', line 63 def plans(args = {}) perform_get_with_objects('/v1/plans', args, AcceptOn::Plan) end |
#promo_code(name) ⇒ AcceptOn::PromoCode
Retrieves a promo code from AcceptOn
108 109 110 |
# File 'lib/accepton/api/querying.rb', line 108 def promo_code(name) perform_get_with_object("/v1/promo_codes/#{name}", {}, AcceptOn::PromoCode) end |
#promo_codes(args = {}) ⇒ Array<AcceptOn::PromoCode>
Retrieves a page of promo codes from AcceptOn
128 129 130 |
# File 'lib/accepton/api/querying.rb', line 128 def promo_codes(args = {}) perform_get_with_objects('/v1/promo_codes', args, AcceptOn::PromoCode) end |
#subscription(id) ⇒ AcceptOn::Subscription
Retrieves a subscription from AcceptOn
75 76 77 |
# File 'lib/accepton/api/querying.rb', line 75 def subscription(id) perform_get_with_object("/v1/subscriptions/#{id}", {}, AcceptOn::Subscription) end |
#subscriptions(args = {}) ⇒ AcceptOn::Subscription
Retrieves a page of subscriptions from AcceptOn
93 94 95 |
# File 'lib/accepton/api/querying.rb', line 93 def subscriptions(args = {}) perform_get_with_objects('/v1/subscriptions', args, AcceptOn::Subscription) end |
#token(id) ⇒ AcceptOn::TransactionToken
Retrieves a transaction token from the API
140 141 142 |
# File 'lib/accepton/api/querying.rb', line 140 def token(id) perform_get_with_object("/v1/tokens/#{id}", {}, AcceptOn::TransactionToken) end |