Class: Stripe::OrderService::CreateParams::ShippingDetails::Address

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/order_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) ⇒ Address

Returns a new instance of Address.



1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
# File 'lib/stripe/services/order_service.rb', line 1046

def initialize(
  city: nil,
  country: nil,
  line1: nil,
  line2: nil,
  postal_code: nil,
  state: nil
)
  @city = city
  @country = country
  @line1 = line1
  @line2 = line2
  @postal_code = postal_code
  @state = state
end

Instance Attribute Details

#cityObject

City, district, suburb, town, or village.



1034
1035
1036
# File 'lib/stripe/services/order_service.rb', line 1034

def city
  @city
end

#countryObject

Two-letter country code ([ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).



1036
1037
1038
# File 'lib/stripe/services/order_service.rb', line 1036

def country
  @country
end

#line1Object

Address line 1 (e.g., street, PO Box, or company name).



1038
1039
1040
# File 'lib/stripe/services/order_service.rb', line 1038

def line1
  @line1
end

#line2Object

Address line 2 (e.g., apartment, suite, unit, or building).



1040
1041
1042
# File 'lib/stripe/services/order_service.rb', line 1040

def line2
  @line2
end

#postal_codeObject

ZIP or postal code.



1042
1043
1044
# File 'lib/stripe/services/order_service.rb', line 1042

def postal_code
  @postal_code
end

#stateObject

State/province as an [ISO 3166-2](en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: “NY” or “TX”.



1044
1045
1046
# File 'lib/stripe/services/order_service.rb', line 1044

def state
  @state
end