class MC2P::PayURLMixin

Add property to get pay_url based on token

Public Class Methods

new(json_dict, resource) click to toggle source
Calls superclass method MC2P::ObjectItemMixin::new
# File lib/mixins.rb, line 176
def initialize(json_dict, resource)
  super(json_dict, resource)
  @pay_url = 'https://pay.mychoice2pay.com/#/%s'
  @iframe_url = 'https://pay.mychoice2pay.com/#/%s/iframe'
end

Public Instance Methods

iframe_url() click to toggle source

Returns: iframe url

# File lib/mixins.rb, line 189
def iframe_url
  id_required_and_not_deleted
  @iframe_url % @json_dict['token']
end
pay_url() click to toggle source

Returns: pay url

# File lib/mixins.rb, line 183
def pay_url
  id_required_and_not_deleted
  @pay_url % @json_dict['token']
end