Class: Increase::Resources::CardValidations

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/card_validations.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardValidations

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 CardValidations.

Parameters:



112
113
114
# File 'lib/increase/resources/card_validations.rb', line 112

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_id: , card_token_id: , merchant_category_code: , merchant_city_name: , merchant_name: , merchant_postal_code: , merchant_state: , cardholder_first_name: nil, cardholder_last_name: nil, cardholder_middle_name: nil, cardholder_postal_code: nil, cardholder_street_address: nil, request_options: {}) ⇒ Increase::Models::CardValidation

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

Create a Card Validation

Parameters:

  • account_id (String)

    The identifier of the Account from which to send the validation.

  • card_token_id (String)

    The Increase identifier for the Card Token that represents the card number you’r

  • merchant_category_code (String)

    A four-digit code (MCC) identifying the type of business or service provided by

  • merchant_city_name (String)

    The city where the merchant (typically your business) is located.

  • merchant_name (String)

    The merchant name that will appear in the cardholder’s statement descriptor. Typ

  • merchant_postal_code (String)

    The postal code for the merchant’s (typically your business’s) location.

  • merchant_state (String)

    The U.S. state where the merchant (typically your business) is located.

  • cardholder_first_name (String)

    The cardholder’s first name.

  • cardholder_last_name (String)

    The cardholder’s last name.

  • cardholder_middle_name (String)

    The cardholder’s middle name.

  • cardholder_postal_code (String)

    The postal code of the cardholder’s address.

  • cardholder_street_address (String)

    The cardholder’s street address.

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

Returns:

See Also:



42
43
44
45
46
47
48
49
50
51
# File 'lib/increase/resources/card_validations.rb', line 42

def create(params)
  parsed, options = Increase::CardValidationCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "card_validations",
    body: parsed,
    model: Increase::CardValidation,
    options: options
  )
end

#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::CardValidation>

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

List Card Validations

Parameters:

Returns:

See Also:



97
98
99
100
101
102
103
104
105
106
107
# File 'lib/increase/resources/card_validations.rb', line 97

def list(params = {})
  parsed, options = Increase::CardValidationListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "card_validations",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::CardValidation,
    options: options
  )
end

#retrieve(card_validation_id, request_options: {}) ⇒ Increase::Models::CardValidation

Retrieve a Card Validation

Parameters:

  • card_validation_id (String)

    The identifier of the Card Validation.

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

Returns:

See Also:



64
65
66
67
68
69
70
71
# File 'lib/increase/resources/card_validations.rb', line 64

def retrieve(card_validation_id, params = {})
  @client.request(
    method: :get,
    path: ["card_validations/%1$s", card_validation_id],
    model: Increase::CardValidation,
    options: params[:request_options]
  )
end