Class: Telnyx::Resources::ExternalRequirements::SubNumberOrders

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/external_requirements/sub_number_orders.rb,
sig/telnyx/resources/external_requirements/sub_number_orders.rbs

Overview

Requirement Groups

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SubNumberOrders

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SubNumberOrders.

Parameters:



93
94
95
# File 'lib/telnyx/resources/external_requirements/sub_number_orders.rb', line 93

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(sub_number_order_id, regulatory_requirement_id:, request_options: {}) ⇒ Telnyx::Models::ExternalRequirements::SubNumberOrderRetrieveResponse

Some parameter documentations has been truncated, see Models::ExternalRequirements::SubNumberOrderRetrieveParams for more details.

Returns the input fields an action requirement needs and the current requirement action for a sub number order. Action requirements are fulfilled by an external step rather than by uploading documents. Australia mobile ID verification is currently the only action requirement. Once a verification link has been generated, it is returned in requirement_action.value.

Parameters:

  • sub_number_order_id (String)

    The ID of the sub number order the requirement belongs to.

  • regulatory_requirement_id (String)

    The ID of the regulatory (action) requirement. For Australia mobile ID verificat

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/telnyx/resources/external_requirements/sub_number_orders.rb', line 29

def retrieve(sub_number_order_id, params)
  parsed, options = Telnyx::ExternalRequirements::SubNumberOrderRetrieveParams.dump_request(params)
  regulatory_requirement_id =
    parsed.delete(:regulatory_requirement_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "external_requirements/%1$s/sub_number_orders/%2$s",
      regulatory_requirement_id,
      sub_number_order_id
    ],
    model: Telnyx::Models::ExternalRequirements::SubNumberOrderRetrieveResponse,
    options: options
  )
end

#update(sub_number_order_id, regulatory_requirement_id:, requirement:, request_options: {}) ⇒ Telnyx::Models::ExternalRequirements::SubNumberOrderUpdateResponse

Some parameter documentations has been truncated, see Models::ExternalRequirements::SubNumberOrderUpdateParams for more details.

Submits the end user's details to the external verification provider and returns the requirement action. Australia mobile ID verification is currently the only action requirement. It generates a unique Onfido verification link, returned in requirement_action.value, which you share with the end user. The end user's first_name and last_name must be nested inside a requirement object; sending them at the top level is rejected.

Parameters:

Returns:

See Also:



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/telnyx/resources/external_requirements/sub_number_orders.rb', line 71

def update(sub_number_order_id, params)
  parsed, options = Telnyx::ExternalRequirements::SubNumberOrderUpdateParams.dump_request(params)
  regulatory_requirement_id =
    parsed.delete(:regulatory_requirement_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :post,
    path: [
      "external_requirements/%1$s/sub_number_orders/%2$s",
      regulatory_requirement_id,
      sub_number_order_id
    ],
    body: parsed,
    model: Telnyx::Models::ExternalRequirements::SubNumberOrderUpdateResponse,
    options: options
  )
end