Class: FatZebra::Utilities::ApplePay::Domain

Inherits:
APIResource show all
Defined in:
lib/fat_zebra/utilities/apple_pay/domain.rb

Constant Summary collapse

ENDPOINT_URL =
'/v1.0/utilities/apple_pay/domains'

Instance Attribute Summary

Attributes inherited from FatZebraObject

#accepted

Attributes included from ObjectHelper

#data, #errors, #raw

Class Method Summary collapse

Methods inherited from APIResource

base_path, request

Methods included from APIHelper

included, #request, #resource_name, #resource_path

Methods inherited from FatZebraObject

initialize_from, #load_response_api, #update_from

Methods included from Validation

#errors, #valid!, #valid?, #validates

Methods included from ObjectHelper

#[], #[]=, #add_accessor, #add_accessors, #add_data, #initialize, #inspect, #keys, #method_missing, #remove_accessor, #to_hash, #to_json, #update_attributes

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class FatZebra::ObjectHelper

Class Method Details

.delete!(domain, options = {}) ⇒ FatZebra::Utilities::ApplePay::Domains

Delete an Apple Pay (web) domain

Parameters:

  • domain (String)
  • options (Hash) (defaults to: {})

    for the request, and configurations (Optional)

Returns:

  • (FatZebra::Utilities::ApplePay::Domains)

    response



57
58
59
60
61
# File 'lib/fat_zebra/utilities/apple_pay/domain.rb', line 57

def delete!(domain, options = {})
  params = {}
  response = request(:delete, path(domain), params, options)
  initialize_from(response)
end

.find!(domain, options = {}) ⇒ FatZebra::Utilities::ApplePay::Domains

Check registration status of an Apple Pay (web) domain

Parameters:

  • domain (String)
  • options (Hash) (defaults to: {})

    for the request, and configurations (Optional)

Returns:

  • (FatZebra::Utilities::ApplePay::Domains)

    response



44
45
46
47
48
# File 'lib/fat_zebra/utilities/apple_pay/domain.rb', line 44

def find!(domain, options = {})
  params = {}
  response = request(:get, path(domain), params, options)
  initialize_from(response)
end

.list(options = {}) ⇒ FatZebra::Utilities::ApplePay::Domains

List Apple Pay (web) domains

Parameters:

  • options (Hash) (defaults to: {})

    for the request, and configurations (Optional)

Returns:

  • (FatZebra::Utilities::ApplePay::Domains)

    response



18
19
20
21
22
# File 'lib/fat_zebra/utilities/apple_pay/domain.rb', line 18

def list(options = {})
  params = {}
  response = request(:get, ENDPOINT_URL, params, options)
  initialize_from(response)
end

.register!(domain, params = {}, options = {}) ⇒ FatZebra::Utilities::ApplePay::Domains

Register an Apple Pay (web) domain

Parameters:

  • domain (String)
  • params (Hash) (defaults to: {})
  • options (Hash) (defaults to: {})

    for the request, and configurations (Optional)

Returns:

  • (FatZebra::Utilities::ApplePay::Domains)

    response



32
33
34
35
# File 'lib/fat_zebra/utilities/apple_pay/domain.rb', line 32

def register!(domain, params = {}, options = {})
  response = request(:post, path(domain), params, options)
  initialize_from(response)
end