Class: WhopSDK::Models::PlanCalculateTaxParams::Address

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/plan_calculate_tax_params.rb,
sig/whop_sdk/models/plan_calculate_tax_params.rbs

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:, address: nil, ip_address: nil, tax_ids: nil, request_options: {}) ⇒ Object

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

Parameters:



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/whop_sdk/models/plan_calculate_tax_params.rb', line 51

class Address < WhopSDK::Internal::Type::BaseModel
  # @!attribute country
  #   ISO 3166-1 alpha-2 country code, such as `US`, `DE`, or `GB`.
  #
  #   @return [String]
  required :country, String

  # @!attribute city
  #   City name.
  #
  #   @return [String, nil]
  optional :city, String, nil?: true

  # @!attribute line1
  #   First line of the street address.
  #
  #   @return [String, nil]
  optional :line1, String, nil?: true

  # @!attribute line2
  #   Second line of the street address.
  #
  #   @return [String, nil]
  optional :line2, String, nil?: true

  # @!attribute postal_code
  #   Postal or ZIP code.
  #
  #   @return [String, nil]
  optional :postal_code, String, nil?: true

  # @!attribute state
  #   State, province, or region code, such as `CA`.
  #
  #   @return [String, nil]
  optional :state, String, nil?: true

  # @!method initialize(country:, city: nil, line1: nil, line2: nil, postal_code: nil, state: nil)
  #   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.
  #
  #   @param country [String] ISO 3166-1 alpha-2 country code, such as `US`, `DE`, or `GB`.
  #
  #   @param city [String, nil] City name.
  #
  #   @param line1 [String, nil] First line of the street address.
  #
  #   @param line2 [String, nil] Second line of the street address.
  #
  #   @param postal_code [String, nil] Postal or ZIP code.
  #
  #   @param state [String, nil] State, province, or region code, such as `CA`.
end

Instance Attribute Details

#cityString?

City name.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :city, String, nil?: true

#countryString

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

Parameters:

  • value (String)

Returns:

  • (String)


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

required :country, String

#line1String?

First line of the street address.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :line1, String, nil?: true

#line2String?

Second line of the street address.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :line2, String, nil?: true

#postal_codeString?

Postal or ZIP code.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :postal_code, String, nil?: true

#stateString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :state, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {