Class: MC2P::CardShareObjectItemMixin

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

Overview

Allows make card and share an object item

Instance Attribute Summary

Attributes inherited from ObjectItemMixin

#_deleted, #json_dict, #resource

Instance Method Summary collapse

Methods inherited from ObjectItemMixin

#id_required_and_not_deleted, #initialize, #to_s

Constructor Details

This class inherits a constructor from MC2P::ObjectItemMixin

Instance Method Details

#card(gateway_code, data = nil) ⇒ Object

Send card details Params:

gateway_code

gateway_code to send

data

data to send

Returns: response dictionary



137
138
139
140
141
142
143
144
# File 'lib/mixins.rb', line 137

def card(gateway_code, data = nil)
  id_required_and_not_deleted
  @resource.card(
    @json_dict[@id_property],
    gateway_code,
    data
  )
end

#share(data = nil) ⇒ Object

Send share details Params:

data

data to send

Returns: response dictionary



150
151
152
153
154
155
156
# File 'lib/mixins.rb', line 150

def share(data = nil)
  id_required_and_not_deleted
  @resource.share(
    @json_dict[@id_property],
    data
  )
end