Class: Wizypay::MerchantVersion
- Defined in:
- lib/wizypay/merchant_version.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
Class Method Details
.for(merchant) ⇒ Object
3 4 5 |
# File 'lib/wizypay/merchant_version.rb', line 3 def self.for(merchant) for_id(merchant.id) end |
.for_id(merchant_id) ⇒ Object
7 8 9 10 |
# File 'lib/wizypay/merchant_version.rb', line 7 def self.for_id(merchant_id) raw = ApiClient.get("/merchants/#{merchant_id}/versions") Collection.new(self, raw[:data], raw[:meta]) end |
Instance Method Details
#created_at ⇒ Object
16 17 18 19 |
# File 'lib/wizypay/merchant_version.rb', line 16 def created_at return nil unless super.present? Time.parse(super) end |
#merchant ⇒ Object
12 13 14 |
# File 'lib/wizypay/merchant_version.rb', line 12 def merchant Merchant.new(super['data']) end |