Class: WhopSDK::Models::PlanCalculateTaxParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/whop_sdk/models/plan_calculate_tax_params.rb,
sig/whop_sdk/models/plan_calculate_tax_params.rbs

Overview

See Also:

  • WhopSDK::Resources::Plans#calculate_tax

Defined Under Namespace

Classes: Address, TaxID

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(country:, city: nil, line1: nil, line2: nil, postal_code: nil, state: nil) ⇒ Object

Buyer billing address used for tax calculation. Provide either address.country or ip_address; include state and postal code when available for more accurate results.

Parameters:

  • country (String)

    ISO 3166-1 alpha-2 country code, such as US, DE, or GB.

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

    City name.

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

    First line of the street address.

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

    Second line of the street address.

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

    Postal or ZIP code.

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

    State, province, or region code, such as CA.



# File 'lib/whop_sdk/models/plan_calculate_tax_params.rb', line 88

Instance Attribute Details

#addressWhopSDK::Models::PlanCalculateTaxParams::Address?

Buyer billing address used for tax calculation. Provide either address.country or ip_address; include state and postal code when available for more accurate results.

Parameters:

  • value (WhopSDK::PlanCalculateTaxParams::Address, nil)

Returns:



21
# File 'lib/whop_sdk/models/plan_calculate_tax_params.rb', line 21

optional :address, -> { WhopSDK::PlanCalculateTaxParams::Address }, nil?: true

#idString

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/whop_sdk/models/plan_calculate_tax_params.rb', line 13

required :id, String

#ip_addressString?

Buyer IP address used to infer location when no billing address is provided.

Parameters:

  • (String)

Returns:

  • (String, nil)


27
# File 'lib/whop_sdk/models/plan_calculate_tax_params.rb', line 27

optional :ip_address, String

#tax_idsArray<WhopSDK::Models::PlanCalculateTaxParams::TaxID>?

Optional buyer tax ID for B2B exemptions. At most one entry is supported.

Parameters:

  • value (::Array[WhopSDK::PlanCalculateTaxParams::TaxID], nil)

Returns:



33
34
35
# File 'lib/whop_sdk/models/plan_calculate_tax_params.rb', line 33

optional :tax_ids,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::PlanCalculateTaxParams::TaxID] },
nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


34
# File 'sig/whop_sdk/models/plan_calculate_tax_params.rbs', line 34

def to_hash: -> {