Class: Dodopayments::Models::Blocklist::BlockedCustomer

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/blocklist/blocked_customer.rb,
sig/dodopayments/models/blocklist/blocked_customer.rbs

Overview

See Also:

  • Dodopayments::Resources::Blocklist::Customers#create

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created_at:, customer_email:, customer_id:, customer_name:, identifier:, source:, blocked_by_email: nil, cancelled_subscription_ids: nil, notes: nil, reason: nil, remaining_subscription_ids: nil, subscriptions_swept: nil, unblocked_at: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::Blocklist::BlockedCustomer for more details.

Parameters:

  • id (String)
  • created_at (Time)
  • customer_email (String)
  • customer_id (String)
  • customer_name (String)
  • identifier (String)

    Customer id or email that the merchant supplied.

  • source (Symbol, Dodopayments::Models::Blocklist::BlockedCustomerSource)

    Where a block came from. Api marks an API-key caller, which carries no

  • blocked_by_email (String, nil) (defaults to: nil)

    Dashboard user who blocked the customer. null for an API-key caller.

  • cancelled_subscription_ids (Array<String>, nil) (defaults to: nil)

    Subscriptions this block cancelled. Present on the create response only.

  • notes (Array<Dodopayments::Models::Blocklist::Customers::BlockedCustomerNote>, nil) (defaults to: nil)

    Activity log. Present on the detail response only.

  • reason (String, nil) (defaults to: nil)
  • remaining_subscription_ids (Array<String>, nil) (defaults to: nil)

    Subscriptions this block left live, because the cancel failed or the

  • subscriptions_swept (Boolean, nil) (defaults to: nil)

    False when the block left live subscriptions behind, including the case

  • unblocked_at (Time, nil) (defaults to: nil)


# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 94

Instance Attribute Details

#blocked_by_emailString?

Dashboard user who blocked the customer. null for an API-key caller.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


50
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 50

optional :blocked_by_email, String, nil?: true

#cancelled_subscription_idsArray<String>?

Subscriptions this block cancelled. Present on the create response only.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


56
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 56

optional :cancelled_subscription_ids, Dodopayments::Internal::Type::ArrayOf[String], nil?: true

#created_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


16
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 16

required :created_at, Time

#customer_emailString

Parameters:

  • value (String)

Returns:

  • (String)


21
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 21

required :customer_email, String

#customer_idString

Parameters:

  • value (String)

Returns:

  • (String)


26
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 26

required :customer_id, String

#customer_nameString

Parameters:

  • value (String)

Returns:

  • (String)


31
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 31

required :customer_name, String

#idString

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 11

required :id, String

#identifierString

Customer id or email that the merchant supplied.

Parameters:

  • value (String)

Returns:

  • (String)


37
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 37

required :identifier, String

#notesArray<Dodopayments::Models::Blocklist::Customers::BlockedCustomerNote>?

Activity log. Present on the detail response only.

Parameters:

  • value (::Array[Dodopayments::Blocklist::Customers::BlockedCustomerNote], nil)

Returns:



62
63
64
65
66
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 62

optional :notes,
-> {
  Dodopayments::Internal::Type::ArrayOf[Dodopayments::Blocklist::Customers::BlockedCustomerNote]
},
nil?: true

#reasonString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


71
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 71

optional :reason, String, nil?: true

#remaining_subscription_idsArray<String>?

Subscriptions this block left live, because the cancel failed or the inline batch filled up. Repeat the create call to continue; the block itself is already in force.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


79
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 79

optional :remaining_subscription_ids, Dodopayments::Internal::Type::ArrayOf[String], nil?: true

#sourceSymbol, Dodopayments::Models::Blocklist::BlockedCustomerSource

Where a block came from. Api marks an API-key caller, which carries no dashboard actor. The other values name the screen the merchant used.

Parameters:

  • value (Dodopayments::Models::Blocklist::blocked_customer_source)

Returns:



44
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 44

required :source, enum: -> { Dodopayments::Blocklist::BlockedCustomerSource }

#subscriptions_sweptBoolean?

False when the block left live subscriptions behind, including the case where the sweep could not list them and remaining_subscription_ids is therefore unknown. Repeat the create call until it reads true.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


87
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 87

optional :subscriptions_swept, Dodopayments::Internal::Type::Boolean, nil?: true

#unblocked_atTime?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


92
# File 'lib/dodopayments/models/blocklist/blocked_customer.rb', line 92

optional :unblocked_at, Time, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


68
# File 'sig/dodopayments/models/blocklist/blocked_customer.rbs', line 68

def to_hash: -> {