Class: PCPServerSDK::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



28
29
30
# File 'lib/PCP-server-Ruby-SDK/models/extended_checkout_status.rb', line 28

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:

  • enum value in the form of the string

Returns:

  • The enum value



35
36
37
# File 'lib/PCP-server-Ruby-SDK/models/extended_checkout_status.rb', line 35

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:

  • enum value in the form of the string

Returns:

  • The enum value



42
43
44
45
# File 'lib/PCP-server-Ruby-SDK/models/extended_checkout_status.rb', line 42

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