class MC2P::AuthorizationResource

Authorization resource

Public Class Methods

new(api_request, path, object_item_class) click to toggle source

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

Calls superclass method MC2P::CRResource::new
# 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

Public Instance Methods

charge(resource_id, data = nil) click to toggle source

Params:

resource_id

id to request

data

data to send

Returns: response dictionary

# File lib/resources.rb, line 48
def charge(resource_id, data = nil)
  @charge_resource_mixin.charge(resource_id, data)
end