Class: AbacatePay::Resources::Customers

Inherits:
Resource
  • Object
show all
Defined in:
lib/abacate_pay/resources/customers.rb,
lib/abacate_pay/resources/customers/metadata.rb

Overview

Represents a customer resource in the AbacatePay payment system.

This class handles customer data including identification and metadata, providing a structured way to manage customer information within the system.

Defined Under Namespace

Classes: Metadata

Constant Summary collapse

RESOURCE_PROPERTIES =

Maps property names to their corresponding resource classes

{
  metadata: "AbacatePay::Resources::Customers::Metadata"
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Customers

Creates a new Customer instance

Parameters:

  • data (Hash)

    The raw customer data

Raises:

  • (ArgumentError)

    If the data is invalid



25
26
27
# File 'lib/abacate_pay/resources/customers.rb', line 25

def initialize(data)
  fill(data)
end

Instance Attribute Details

#idString?

Returns The unique identifier for the customer.

Returns:

  • (String, nil)

    The unique identifier for the customer



16
17
18
# File 'lib/abacate_pay/resources/customers.rb', line 16

def id
  @id
end

#metadataMetadata?

Returns Additional customer information.

Returns:

  • (Metadata, nil)

    Additional customer information



19
20
21
# File 'lib/abacate_pay/resources/customers.rb', line 19

def 
  @metadata
end