Class: MC2P::PayURLMixin
- Inherits:
-
ObjectItemMixin
- Object
- ObjectItemMixin
- MC2P::PayURLMixin
- Defined in:
- lib/mixins.rb
Overview
Add property to get pay_url based on token
Instance Attribute Summary
Attributes inherited from ObjectItemMixin
#_deleted, #json_dict, #resource
Instance Method Summary collapse
-
#iframe_url ⇒ Object
Returns: iframe url.
-
#initialize(json_dict, resource) ⇒ PayURLMixin
constructor
A new instance of PayURLMixin.
-
#pay_url ⇒ Object
Returns: pay url.
Methods inherited from ObjectItemMixin
#id_required_and_not_deleted, #to_s
Constructor Details
#initialize(json_dict, resource) ⇒ PayURLMixin
Returns a new instance of PayURLMixin.
176 177 178 179 180 |
# 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 |
Instance Method Details
#iframe_url ⇒ Object
Returns: iframe url
189 190 191 192 |
# File 'lib/mixins.rb', line 189 def iframe_url id_required_and_not_deleted @iframe_url % @json_dict['token'] end |
#pay_url ⇒ Object
Returns: pay url
183 184 185 186 |
# File 'lib/mixins.rb', line 183 def pay_url id_required_and_not_deleted @pay_url % @json_dict['token'] end |