Class: Reach::REST::Api::Authentix::ConfigurationItemContext::AuthenticationControlItemList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/reach-ruby/rest/api/authentix/configuration_item/authentication_control_item.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, configuration_id: nil) ⇒ AuthenticationControlItemList

Initialize the AuthenticationControlItemList

Parameters:

  • version (Version)

    Version that contains the resource



28
29
30
31
32
33
34
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_control_item.rb', line 28

def initialize(version, configuration_id: nil)
    super(version)
    # Path Solution
    @solution = { configuration_id: configuration_id }
    @uri = "/authentix/v1/configurations/#{@solution[:configuration_id]}/authentication-controls"
    
end

Instance Method Details

#check(dest: :unset, code: :unset, authentication_id: :unset, payment_info: :unset) ⇒ AuthenticationControlItemInstance

Check the AuthenticationControlItemInstance

Parameters:

  • dest (String) (defaults to: :unset)

    The phone number or email being authenticated. Phone numbers must be in E.164 format. Either this parameter or the ‘authenticationId` must be specified.

  • code (String) (defaults to: :unset)

    The 4-10 character string being verified. This is required for ‘sms` and `email` channels.

  • authentication_id (String) (defaults to: :unset)

    The ID of the authentication being checked. Either this parameter or the to ‘dest` must be specified.

  • payment_info (String) (defaults to: :unset)

    Information related to the digital payment to authenticate. It is required when ‘usedForDigitalPayment` is true. It is ignored otherwise. It is a stringfied JSON map where keys are `payee`, `amount`, and `currency` and the associated values are respectively the payee, the amount, and the currency of a financial transaction.

Returns:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_control_item.rb', line 42

def check(
    dest: :unset, 
    code: :unset, 
    authentication_id: :unset, 
    payment_info: :unset
)

    baseParams = {
    }
    data = Reach::Values.of(baseParams.merge({                        
        'dest' => dest,
        'code' => code,
        'authenticationId' => authentication_id,
        'paymentInfo' => payment_info,
    }))

    
    
    payload = @version.check('POST', @uri, data: data)
    AuthenticationControlItemInstance.new(
        @version,
        payload,
        configuration_id: @solution[:configuration_id],
    )
end

#to_sObject

Provide a user friendly representation



72
73
74
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_control_item.rb', line 72

def to_s
    '#<Reach.Api.Authentix.AuthenticationControlItemList>'
end