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.
161 162 163 164 165 |
# File 'lib/mixins.rb', line 161 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
174 175 176 177 |
# File 'lib/mixins.rb', line 174 def iframe_url id_required_and_not_deleted @iframe_url % @json_dict['token'] end |
#pay_url ⇒ Object
Returns: pay url
168 169 170 171 |
# File 'lib/mixins.rb', line 168 def pay_url id_required_and_not_deleted @pay_url % @json_dict['token'] end |