Method: ShopifyAPI::Customer#initialize

Defined in:
lib/shopify_api/rest/resources/2022_04/customer.rb,
lib/shopify_api/rest/resources/2022_07/customer.rb,
lib/shopify_api/rest/resources/2022_10/customer.rb,
lib/shopify_api/rest/resources/2023_01/customer.rb,
lib/shopify_api/rest/resources/2023_04/customer.rb,
lib/shopify_api/rest/resources/2023_07/customer.rb,
lib/shopify_api/rest/resources/2023_10/customer.rb,
lib/shopify_api/rest/resources/2024_01/customer.rb,
lib/shopify_api/rest/resources/2024_04/customer.rb,
lib/shopify_api/rest/resources/2024_07/customer.rb,
lib/shopify_api/rest/resources/2024_10/customer.rb,
lib/shopify_api/rest/resources/2025_01/customer.rb,
lib/shopify_api/rest/resources/2025_04/customer.rb,
lib/shopify_api/rest/resources/2025_07/customer.rb

#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ Customer

Returns a new instance of Customer.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/shopify_api/rest/resources/2022_04/customer.rb', line 19

def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)

  @accepts_marketing = T.let(nil, T.nilable(T::Boolean))
  @accepts_marketing_updated_at = T.let(nil, T.nilable(String))
  @addresses = T.let(nil, T.nilable(T::Array[T.untyped]))
  @created_at = T.let(nil, T.nilable(String))
  @currency = T.let(nil, T.nilable(String))
  @default_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
  @email = T.let(nil, T.nilable(String))
  @email_marketing_consent = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
  @first_name = T.let(nil, T.nilable(String))
  @id = T.let(nil, T.nilable(Integer))
  @last_name = T.let(nil, T.nilable(String))
  @last_order_id = T.let(nil, T.nilable(Integer))
  @last_order_name = T.let(nil, T.nilable(String))
  @marketing_opt_in_level = T.let(nil, T.nilable(String))
  @metafield = T.let(nil, T.nilable(Metafield))
  @multipass_identifier = T.let(nil, T.nilable(String))
  @note = T.let(nil, T.nilable(String))
  @orders_count = T.let(nil, T.nilable(Integer))
  @password = T.let(nil, T.nilable(String))
  @password_confirmation = T.let(nil, T.nilable(String))
  @phone = T.let(nil, T.nilable(String))
  @sms_marketing_consent = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
  @state = T.let(nil, T.nilable(String))
  @tags = T.let(nil, T.nilable(String))
  @tax_exempt = T.let(nil, T.nilable(T::Boolean))
  @tax_exemptions = T.let(nil, T.nilable(T::Array[T.untyped]))
  @total_spent = T.let(nil, T.nilable(String))
  @updated_at = T.let(nil, T.nilable(String))
  @verified_email = T.let(nil, T.nilable(T::Boolean))

  super(session: session, from_hash: from_hash)
end