Class: MC2P::AuthorizationResource
- Inherits:
-
CRResource
- Object
- ResourceMixin
- Resource
- DetailOnlyResource
- ReadOnlyResource
- CRResource
- MC2P::AuthorizationResource
- Defined in:
- lib/resources.rb
Overview
Authorization resource
Instance Method Summary collapse
-
#charge(resource_id, data = nil) ⇒ Object
- Params:
resource_id
- id to request
data
-
data to send Returns: response dictionary.
- id to request
- Params:
-
#initialize(api_request, path, object_item_class) ⇒ AuthorizationResource
constructor
- Initializes a resource Params:
api_request
- Api request used to make all the requests to the API
path
- Path used to make all the requests to the API
object_item_class
-
Object item class used to return values.
- Path used to make all the requests to the API
- Api request used to make all the requests to the API
- Initializes a resource Params:
Methods inherited from CRResource
Methods inherited from ReadOnlyResource
Methods inherited from DetailOnlyResource
Methods inherited from ResourceMixin
Constructor Details
#initialize(api_request, path, object_item_class) ⇒ AuthorizationResource
Initializes a resource Params:
api_request
-
Api request used to make all the requests to the API
path
-
Path used to make all the requests to the API
object_item_class
-
Object item class used to return values
37 38 39 40 41 42 |
# File 'lib/resources.rb', line 37 def initialize(api_request, path, object_item_class) super(api_request, path, object_item_class) @charge_resource_mixin = ChargeResourceMixin.new(api_request, path, object_item_class, @paginator_class) end |
Instance Method Details
#charge(resource_id, data = nil) ⇒ Object
Params:
resource_id
-
id to request
data
-
data to send
Returns: response dictionary
48 49 50 |
# File 'lib/resources.rb', line 48 def charge(resource_id, data = nil) @charge_resource_mixin.charge(resource_id, data) end |