Class: MC2P::CardShareResourceMixin

Inherits:
ActionsResourceMixin show all
Defined in:
lib/mixins.rb

Overview

Allows send action requests of card and share

Instance Method Summary collapse

Methods inherited from ActionsResourceMixin

#_one_item_action, #detail_action_url

Methods inherited from ResourceMixin

#_one_item, #detail_url, #initialize

Constructor Details

This class inherits a constructor from MC2P::ResourceMixin

Instance Method Details

#card(resource_id, gateway_code, data = nil) ⇒ Object

Params:

resource_id

id to request

gateway_code

gateway_code to send

data

data to send

Returns: response dictionary



374
375
376
377
378
379
# File 'lib/mixins.rb', line 374

def card(resource_id, gateway_code, data = nil)
  _one_item_action('post',
                   resource_id,
                   "card/#{gateway_code}",
                   data)
end

#share(resource_id, data = nil) ⇒ Object

Params:

resource_id

id to request

data

data to send

Returns: response dictionary



385
386
387
388
389
390
# File 'lib/mixins.rb', line 385

def share(resource_id, data = nil)
  _one_item_action('post',
                   resource_id,
                   'share',
                   data)
end