class Lithic::Resources::AuthRules::V2

def apply(auth_rule_token, params)

Other tags:
    See: Lithic::Models::AuthRules::V2ApplyParams -

Returns:
  • (Lithic::Models::AuthRules::V2ApplyResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • excluded_card_tokens (Array) -- Card tokens to which the Auth Rule does not apply.
  • program_level (Boolean) -- Whether the Auth Rule applies to all authorizations on the card program.
  • card_tokens (Array) -- Card tokens to which the Auth Rule applies.
  • account_tokens (Array) -- Account tokens to which the Auth Rule applies.
  • auth_rule_token (String) -- Globally unique identifier for the Auth Rule.

Overloads:
  • apply(auth_rule_token, account_tokens:, card_tokens:, program_level:, excluded_card_tokens: nil, request_options: {})
def apply(auth_rule_token, params)
  parsed, options = Lithic::AuthRules::V2ApplyParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["v2/auth_rules/%1$s/apply", auth_rule_token],
    body: parsed,
    model: Lithic::Models::AuthRules::V2ApplyResponse,
    options: options
  )
end

def create(params)

Other tags:
    See: Lithic::Models::AuthRules::V2CreateParams -

Returns:
  • (Lithic::Models::AuthRules::V2CreateResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • excluded_card_tokens (Array) -- Card tokens to which the Auth Rule does not apply.
  • type (Symbol, Lithic::AuthRules::V2CreateParams::Type) -- The type of Auth Rule
  • parameters (Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::AuthRules::V2CreateParams::Parameters::MerchantLockParameters) -- Parameters for the Auth Rule
  • name (String, nil) -- Auth Rule Name
  • program_level (Boolean) -- Whether the Auth Rule applies to all authorizations on the card program.
  • card_tokens (Array) -- Card tokens to which the Auth Rule applies.
  • account_tokens (Array) -- Account tokens to which the Auth Rule applies.

Overloads:
  • create(account_tokens:, card_tokens:, program_level:, name: nil, parameters: nil, type: nil, excluded_card_tokens: nil, request_options: {})
def create(params)
  parsed, options = Lithic::AuthRules::V2CreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v2/auth_rules",
    body: parsed,
    model: Lithic::Models::AuthRules::V2CreateResponse,
    options: options
  )
end

def delete(auth_rule_token, params = {})

Other tags:
    See: Lithic::Models::AuthRules::V2DeleteParams -

Returns:
  • (nil) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • auth_rule_token (String) -- Globally unique identifier for the Auth Rule.

Overloads:
  • delete(auth_rule_token, request_options: {})
def delete(auth_rule_token, params = {})
  @client.request(
    method: :delete,
    path: ["v2/auth_rules/%1$s", auth_rule_token],
    model: NilClass,
    options: params[:request_options]
  )
end

def draft(auth_rule_token, params = {})

Other tags:
    See: Lithic::Models::AuthRules::V2DraftParams -

Returns:
  • (Lithic::Models::AuthRules::V2DraftResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • parameters (Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::AuthRules::V2DraftParams::Parameters::MerchantLockParameters, nil) -- Parameters for the Auth Rule
  • auth_rule_token (String) -- Globally unique identifier for the Auth Rule.

Overloads:
  • draft(auth_rule_token, parameters: nil, request_options: {})
def draft(auth_rule_token, params = {})
  parsed, options = Lithic::AuthRules::V2DraftParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["v2/auth_rules/%1$s/draft", auth_rule_token],
    body: parsed,
    model: Lithic::Models::AuthRules::V2DraftResponse,
    options: options
  )
end

def initialize(client:)

Parameters:
  • client (Lithic::Client) --

Other tags:
    Api: - private
def initialize(client:)
  @client = client
  @backtests = Lithic::Resources::AuthRules::V2::Backtests.new(client: client)
end

def list(params = {})

Other tags:
    See: Lithic::Models::AuthRules::V2ListParams -

Returns:
  • (Lithic::Internal::CursorPage) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • starting_after (String) -- A cursor representing an item's token after which a page of results should begin
  • scope (Symbol, Lithic::AuthRules::V2ListParams::Scope) -- Only return Authorization Rules that are bound to the provided scope;
  • page_size (Integer) -- Page size (for pagination).
  • ending_before (String) -- A cursor representing an item's token before which a page of results should end.
  • card_token (String) -- Only return Authorization Rules that are bound to the provided card token.
  • account_token (String) -- Only return Authorization Rules that are bound to the provided account token.

Overloads:
  • list(account_token: nil, card_token: nil, ending_before: nil, page_size: nil, scope: nil, starting_after: nil, request_options: {})
def list(params = {})
  parsed, options = Lithic::AuthRules::V2ListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "v2/auth_rules",
    query: parsed,
    page: Lithic::Internal::CursorPage,
    model: Lithic::Models::AuthRules::V2ListResponse,
    options: options
  )
end

def promote(auth_rule_token, params = {})

Other tags:
    See: Lithic::Models::AuthRules::V2PromoteParams -

Returns:
  • (Lithic::Models::AuthRules::V2PromoteResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • auth_rule_token (String) -- Globally unique identifier for the Auth Rule.

Overloads:
  • promote(auth_rule_token, request_options: {})
def promote(auth_rule_token, params = {})
  @client.request(
    method: :post,
    path: ["v2/auth_rules/%1$s/promote", auth_rule_token],
    model: Lithic::Models::AuthRules::V2PromoteResponse,
    options: params[:request_options]
  )
end

def report(auth_rule_token, params = {})

Other tags:
    See: Lithic::Models::AuthRules::V2ReportParams -

Returns:
  • (Lithic::Models::AuthRules::V2ReportResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • auth_rule_token (String) -- Globally unique identifier for the Auth Rule.

Overloads:
  • report(auth_rule_token, request_options: {})
def report(auth_rule_token, params = {})
  @client.request(
    method: :post,
    path: ["v2/auth_rules/%1$s/report", auth_rule_token],
    model: Lithic::Models::AuthRules::V2ReportResponse,
    options: params[:request_options]
  )
end

def retrieve(auth_rule_token, params = {})

Other tags:
    See: Lithic::Models::AuthRules::V2RetrieveParams -

Returns:
  • (Lithic::Models::AuthRules::V2RetrieveResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • auth_rule_token (String) -- Globally unique identifier for the Auth Rule.

Overloads:
  • retrieve(auth_rule_token, request_options: {})
def retrieve(auth_rule_token, params = {})
  @client.request(
    method: :get,
    path: ["v2/auth_rules/%1$s", auth_rule_token],
    model: Lithic::Models::AuthRules::V2RetrieveResponse,
    options: params[:request_options]
  )
end

def update(auth_rule_token, params = {})

Other tags:
    See: Lithic::Models::AuthRules::V2UpdateParams -

Returns:
  • (Lithic::Models::AuthRules::V2UpdateResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • program_level (Boolean) -- Whether the Auth Rule applies to all authorizations on the card program.
  • excluded_card_tokens (Array) -- Card tokens to which the Auth Rule does not apply.
  • card_tokens (Array) -- Card tokens to which the Auth Rule applies.
  • state (Symbol, Lithic::AuthRules::V2UpdateParams::State) -- The desired state of the Auth Rule.
  • name (String, nil) -- Auth Rule Name
  • account_tokens (Array) -- Account tokens to which the Auth Rule applies.
  • auth_rule_token (String) -- Globally unique identifier for the Auth Rule.

Overloads:
  • update(auth_rule_token, account_tokens: nil, name: nil, state: nil, card_tokens: nil, excluded_card_tokens: nil, program_level: nil, request_options: {})
def update(auth_rule_token, params = {})
  parsed, options = Lithic::AuthRules::V2UpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["v2/auth_rules/%1$s", auth_rule_token],
    body: parsed,
    model: Lithic::Models::AuthRules::V2UpdateResponse,
    options: options
  )
end