Class: Xdelivery::API::Response::Shops

Inherits:
Base
  • Object
show all
Defined in:
lib/xdelivery/api/response/shops.rb

Defined Under Namespace

Classes: Shop

Instance Attribute Summary

Attributes inherited from Base

#data, #response

Instance Method Summary collapse

Methods inherited from Base

#auth?, #code, #initialize

Constructor Details

This class inherits a constructor from Xdelivery::API::Response::Base

Instance Method Details

#shopsObject



12
13
14
15
16
# File 'lib/xdelivery/api/response/shops.rb', line 12

def shops
  data.map do |setting|
    Shop.new(setting['id'], setting['title'], setting['pay2go_merchant_id'], setting['default_shop'])
  end
end

#status?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/xdelivery/api/response/shops.rb', line 8

def status?
  auth?
end