Class: Iyzi::Requests::SubMerchant

Inherits:
Iyzi::Request show all
Defined in:
lib/iyzi/requests/sub_merchant.rb

Constant Summary

Constants inherited from Iyzi::Request

Iyzi::Request::AUTHORIZATION_HEADER_NAME, Iyzi::Request::AUTHORIZATION_HEADER_STRING, Iyzi::Request::DEFAULT_LOCALE, Iyzi::Request::RANDOM_HEADER_NAME

Instance Attribute Summary collapse

Attributes inherited from Iyzi::Request

#config, #method, #options, #path, #pki, #random_string

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Iyzi::Request

#auth_header_string, #auth_headers, #call, #connection, #has_pki?, #iyzi_options, #params_will_be_hashed, #request_hash_digest, #response, #secure_random_string

Constructor Details

#initialize(type, method, path, options = {}) ⇒ SubMerchant

Returns a new instance of SubMerchant.



20
21
22
23
# File 'lib/iyzi/requests/sub_merchant.rb', line 20

def initialize(type, method, path, options = {})
  @type = type
  super(method, path, options)
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/iyzi/requests/sub_merchant.rb', line 4

def type
  @type
end

Class Method Details

.create(options) ⇒ Object



7
8
9
# File 'lib/iyzi/requests/sub_merchant.rb', line 7

def create(options)
  new(:create, Endpoints::HTTP_POST, Endpoints::SUB_MERCHANT_CREATE, options)
end

.retreive(options) ⇒ Object



15
16
17
# File 'lib/iyzi/requests/sub_merchant.rb', line 15

def retreive(options)
  new(:retreive, Endpoints::HTTP_POST, Endpoints::SUB_MERCHANT_DETAIL, options)
end

.update(options) ⇒ Object



11
12
13
# File 'lib/iyzi/requests/sub_merchant.rb', line 11

def update(options)
  new(:update, Endpoints::HTTP_PUT, Endpoints::SUB_MERCHANT_UPDATE, options)
end

Instance Method Details

#to_pkiObject



25
26
27
# File 'lib/iyzi/requests/sub_merchant.rb', line 25

def to_pki
  PkiBuilders::SubMerchant.new(type, iyzi_options).request_string
end