Class: UspsApi::Scope31

Inherits:
Object
  • Object
show all
Defined in:
lib/usps_api/models/scope31.rb

Overview

scope31.

Constant Summary collapse

SCOPE31 =
[
  # TODO: Write general description for
  # SUBSCRIPTIONSPACKAGETRANSACTIONDETAILS
  SUBSCRIPTIONSPACKAGETRANSACTIONDETAILS = 'subscriptions-package-transaction-details'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = SUBSCRIPTIONSPACKAGETRANSACTIONDETAILS) ⇒ Object



21
22
23
24
25
# File 'lib/usps_api/models/scope31.rb', line 21

def self.from_value(value, default_value = SUBSCRIPTIONSPACKAGETRANSACTIONDETAILS)
  return default_value if value.nil?

  default_value
end

.validate(value) ⇒ Object



15
16
17
18
19
# File 'lib/usps_api/models/scope31.rb', line 15

def self.validate(value)
  return false if value.nil?

  SCOPE31.include?(value)
end