Class: PCPServerSDK::Models::ExtendedCheckoutStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/PCP-server-Ruby-SDK/models/extended_checkout_status.rb

Constant Summary collapse

OPEN =
"OPEN".freeze
DELETED =
"DELETED".freeze
PENDING_COMPLETION =
"PENDING_COMPLETION".freeze
COMPLETED =
"COMPLETED".freeze
PARTIALLY_BILLED =
"PARTIALLY_BILLED".freeze
BILLED =
"BILLED".freeze
CHARGEBACKED =
"CHARGEBACKED".freeze
PARTIALLY_REFUNDED =
"PARTIALLY_REFUNDED".freeze
REFUNDED =
"REFUNDED".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



18
19
20
# File 'lib/PCP-server-Ruby-SDK/models/extended_checkout_status.rb', line 18

def self.all_vars
  @all_vars ||= [OPEN, DELETED, PENDING_COMPLETION, COMPLETED, PARTIALLY_BILLED, BILLED, CHARGEBACKED, PARTIALLY_REFUNDED, REFUNDED].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



25
26
27
# File 'lib/PCP-server-Ruby-SDK/models/extended_checkout_status.rb', line 25

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



32
33
34
35
# File 'lib/PCP-server-Ruby-SDK/models/extended_checkout_status.rb', line 32

def build_from_hash(value)
  return value if ExtendedCheckoutStatus.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #ExtendedCheckoutStatus"
end