stbaldricks 10.4.0.alpha.2 → 10.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stbaldricks/configuration.rb +4 -4
- data/lib/stbaldricks/endpoints/donation.rb +2 -2
- data/lib/stbaldricks/endpoints/lib/entity.rb +2 -2
- data/lib/stbaldricks/endpoints/photo.rb +1 -3
- data/lib/stbaldricks/entities/batch.rb +2 -2
- data/lib/stbaldricks/entities/challenge.rb +4 -4
- data/lib/stbaldricks/entities/challenger.rb +2 -2
- data/lib/stbaldricks/entities/challenger/model_type.rb +2 -0
- data/lib/stbaldricks/entities/concerns/entity_response_concern.rb +2 -4
- data/lib/stbaldricks/entities/config.rb +1 -1
- data/lib/stbaldricks/entities/contact.rb +1 -1
- data/lib/stbaldricks/entities/deduplicator_match.rb +5 -5
- data/lib/stbaldricks/entities/donation.rb +3 -3
- data/lib/stbaldricks/entities/donation/donor_type.rb +2 -0
- data/lib/stbaldricks/entities/donation/how_created.rb +2 -0
- data/lib/stbaldricks/entities/donation/payment_gateway.rb +2 -0
- data/lib/stbaldricks/entities/donation/payment_type.rb +2 -0
- data/lib/stbaldricks/entities/donation/promo_code.rb +19 -5
- data/lib/stbaldricks/entities/donation/recipient_type.rb +2 -0
- data/lib/stbaldricks/entities/donation/special_donation_type.rb +2 -0
- data/lib/stbaldricks/entities/donation/status.rb +2 -0
- data/lib/stbaldricks/entities/donation/submitter_type.rb +2 -0
- data/lib/stbaldricks/entities/event.rb +10 -14
- data/lib/stbaldricks/entities/event/fund_relationship_type.rb +2 -0
- data/lib/stbaldricks/entities/event/how_created.rb +2 -0
- data/lib/stbaldricks/entities/event/promo_code.rb +2 -0
- data/lib/stbaldricks/entities/event/status.rb +2 -0
- data/lib/stbaldricks/entities/event/sub_type.rb +2 -0
- data/lib/stbaldricks/entities/event/type.rb +2 -0
- data/lib/stbaldricks/entities/event_application/model_type.rb +2 -0
- data/lib/stbaldricks/entities/event_application/status.rb +2 -0
- data/lib/stbaldricks/entities/fund.rb +1 -2
- data/lib/stbaldricks/entities/fundraiser.rb +21 -25
- data/lib/stbaldricks/entities/international_partner.rb +2 -2
- data/lib/stbaldricks/entities/kid.rb +62 -62
- data/lib/stbaldricks/entities/kid_honor.rb +4 -4
- data/lib/stbaldricks/entities/lib/address.rb +2 -2
- data/lib/stbaldricks/entities/lib/alternate_shipping_address.rb +2 -2
- data/lib/stbaldricks/entities/lib/base.rb +24 -27
- data/lib/stbaldricks/entities/lib/cacheable.rb +1 -3
- data/lib/stbaldricks/entities/lib/collection.rb +2 -2
- data/lib/stbaldricks/entities/lib/email_address.rb +2 -2
- data/lib/stbaldricks/entities/lib/fundraising_page.rb +1 -1
- data/lib/stbaldricks/entities/lib/not_implemented_object.rb +4 -4
- data/lib/stbaldricks/entities/lib/payment.rb +14 -14
- data/lib/stbaldricks/entities/lib/phone.rb +3 -3
- data/lib/stbaldricks/entities/lib/third_party_media.rb +2 -2
- data/lib/stbaldricks/entities/lib/top_level.rb +4 -4
- data/lib/stbaldricks/entities/memorial.rb +3 -4
- data/lib/stbaldricks/entities/message.rb +8 -8
- data/lib/stbaldricks/entities/organization.rb +21 -21
- data/lib/stbaldricks/entities/page.rb +4 -6
- data/lib/stbaldricks/entities/participant.rb +58 -61
- data/lib/stbaldricks/entities/person.rb +97 -98
- data/lib/stbaldricks/entities/photo.rb +26 -26
- data/lib/stbaldricks/entities/recurring_gift.rb +18 -18
- data/lib/stbaldricks/entities/search.rb +8 -8
- data/lib/stbaldricks/entities/shave_schedule.rb +2 -2
- data/lib/stbaldricks/entities/team.rb +15 -18
- data/lib/stbaldricks/entities/user.rb +7 -5
- data/lib/stbaldricks/enums/cancer_types.rb +2 -0
- data/lib/stbaldricks/enums/country.rb +2 -0
- data/lib/stbaldricks/enums/league_status.rb +2 -0
- data/lib/stbaldricks/enums/model_type.rb +2 -0
- data/lib/stbaldricks/enums/permission.rb +8 -8
- data/lib/stbaldricks/enums/permission_model_type.rb +2 -0
- data/lib/stbaldricks/enums/province.rb +2 -0
- data/lib/stbaldricks/enums/state.rb +2 -0
- data/lib/stbaldricks/enums/top_level_category_type.rb +2 -0
- data/lib/stbaldricks/log.rb +3 -1
- data/lib/stbaldricks/patches/hash.rb +2 -2
- data/lib/stbaldricks/patches/string.rb +1 -1
- data/lib/stbaldricks/request.rb +3 -3
- data/lib/stbaldricks/version.rb +1 -1
- data/lib/stbaldricks_factories.rb +1 -1
- data/spec/factories/challenger.rb +2 -2
- data/spec/factories/kid.rb +3 -3
- data/spec/factories/kid_institution.rb +2 -2
- data/spec/factories/team.rb +2 -2
- metadata +88 -88
@@ -16,43 +16,43 @@ module SBF
|
|
16
16
|
attr_accessor :other
|
17
17
|
|
18
18
|
module CancerType
|
19
|
-
ACUTE_LYMPHOBLASTIC_LEUKEMIA = 'acute_lymphoblastic_leukemia'
|
20
|
-
ACUTE_MYELOID_LEUKEMIA = 'acute_myeloid_leukemia'
|
21
|
-
BRAIN_OR_SPINAL_CORD_TUMOR = 'brain_or_spinal_cord_tumor'
|
22
|
-
KIDNEY_SARCOMA = 'kidney_sarcoma'
|
23
|
-
EWING_SARCOMA = 'ewing_sarcoma'
|
24
|
-
GERM_CELL_TUMOR = 'germ_cell_tumor'
|
25
|
-
HEPATOBLASTOMA = 'hepatoblastoma'
|
26
|
-
HODGKIN_LYMPHOMA = 'hodgkin_lymphoma'
|
27
|
-
LANGERHANS_CELL_HISTIOCYTOSIS = 'langerhans_cell_histiocytosis'
|
28
|
-
LYMPHOMA = 'lymphoma'
|
29
|
-
NEUROBLASTOMA = 'neuroblastoma'
|
30
|
-
NON_HODGKIN_LYMPHOMA = 'non_hodgkin_lymphoma'
|
31
|
-
OSTEOSARCOMA = 'osteosarcoma'
|
32
|
-
RETINOBLASTOMA = 'retinoblastoma'
|
33
|
-
RHABDOMYOSARCOMA = 'rhabdomyosarcoma'
|
34
|
-
WILMS_OR_OTHER_KIDNEY_TUMOR = 'wilms_or_other_kidney_tumor'
|
35
|
-
ADULT_WITH_CHILDHOOD_CANCER = 'adult_with_childhood_cancer'
|
36
|
-
OTHER_CHILDHOOD_CANCER = 'other_childhood_cancer'
|
19
|
+
ACUTE_LYMPHOBLASTIC_LEUKEMIA = 'acute_lymphoblastic_leukemia'.freeze
|
20
|
+
ACUTE_MYELOID_LEUKEMIA = 'acute_myeloid_leukemia'.freeze
|
21
|
+
BRAIN_OR_SPINAL_CORD_TUMOR = 'brain_or_spinal_cord_tumor'.freeze
|
22
|
+
KIDNEY_SARCOMA = 'kidney_sarcoma'.freeze
|
23
|
+
EWING_SARCOMA = 'ewing_sarcoma'.freeze
|
24
|
+
GERM_CELL_TUMOR = 'germ_cell_tumor'.freeze
|
25
|
+
HEPATOBLASTOMA = 'hepatoblastoma'.freeze
|
26
|
+
HODGKIN_LYMPHOMA = 'hodgkin_lymphoma'.freeze
|
27
|
+
LANGERHANS_CELL_HISTIOCYTOSIS = 'langerhans_cell_histiocytosis'.freeze
|
28
|
+
LYMPHOMA = 'lymphoma'.freeze
|
29
|
+
NEUROBLASTOMA = 'neuroblastoma'.freeze
|
30
|
+
NON_HODGKIN_LYMPHOMA = 'non_hodgkin_lymphoma'.freeze
|
31
|
+
OSTEOSARCOMA = 'osteosarcoma'.freeze
|
32
|
+
RETINOBLASTOMA = 'retinoblastoma'.freeze
|
33
|
+
RHABDOMYOSARCOMA = 'rhabdomyosarcoma'.freeze
|
34
|
+
WILMS_OR_OTHER_KIDNEY_TUMOR = 'wilms_or_other_kidney_tumor'.freeze
|
35
|
+
ADULT_WITH_CHILDHOOD_CANCER = 'adult_with_childhood_cancer'.freeze
|
36
|
+
OTHER_CHILDHOOD_CANCER = 'other_childhood_cancer'.freeze
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
40
|
class Guardian < SBF::Client::BaseEntity
|
41
41
|
module RelationshipType
|
42
|
-
SELF_ADULT = 'adult'
|
43
|
-
SELF_MINOR = 'minor'
|
44
|
-
MOTHER = 'mother'
|
45
|
-
FATHER = 'father'
|
46
|
-
SISTER = 'sister'
|
47
|
-
BROTHER = 'brother'
|
48
|
-
AUNT = 'aunt'
|
49
|
-
UNCLE = 'uncle'
|
50
|
-
GRANDMOTHER = 'grandmother'
|
51
|
-
GRANDFATHER = 'grandfather'
|
52
|
-
STEP_MOTHER = 'stepmother'
|
53
|
-
STEP_FATHER = 'stepfather'
|
54
|
-
FRIEND = 'friend'
|
55
|
-
COUSIN = 'cousin'
|
42
|
+
SELF_ADULT = 'adult'.freeze
|
43
|
+
SELF_MINOR = 'minor'.freeze
|
44
|
+
MOTHER = 'mother'.freeze
|
45
|
+
FATHER = 'father'.freeze
|
46
|
+
SISTER = 'sister'.freeze
|
47
|
+
BROTHER = 'brother'.freeze
|
48
|
+
AUNT = 'aunt'.freeze
|
49
|
+
UNCLE = 'uncle'.freeze
|
50
|
+
GRANDMOTHER = 'grandmother'.freeze
|
51
|
+
GRANDFATHER = 'grandfather'.freeze
|
52
|
+
STEP_MOTHER = 'stepmother'.freeze
|
53
|
+
STEP_FATHER = 'stepfather'.freeze
|
54
|
+
FRIEND = 'friend'.freeze
|
55
|
+
COUSIN = 'cousin'.freeze
|
56
56
|
end
|
57
57
|
|
58
58
|
attr_accessor :name
|
@@ -67,19 +67,19 @@ module SBF
|
|
67
67
|
attr_accessor :other
|
68
68
|
|
69
69
|
module SurvivorState
|
70
|
-
IN_TREATMENT = 'in_treatment'
|
71
|
-
IN_MAINTENANCE = 'in_maintenance'
|
72
|
-
IN_REMISSION = 'in_remission'
|
73
|
-
NED = 'no_evidence_of_disease'
|
74
|
-
CANCER_FREE = 'cancer_free'
|
75
|
-
OTHER_LIVING = 'other_living'
|
70
|
+
IN_TREATMENT = 'in_treatment'.freeze
|
71
|
+
IN_MAINTENANCE = 'in_maintenance'.freeze
|
72
|
+
IN_REMISSION = 'in_remission'.freeze
|
73
|
+
NED = 'no_evidence_of_disease'.freeze
|
74
|
+
CANCER_FREE = 'cancer_free'.freeze
|
75
|
+
OTHER_LIVING = 'other_living'.freeze
|
76
76
|
end
|
77
77
|
|
78
78
|
module DeceasedState
|
79
|
-
ANGEL = 'angel'
|
80
|
-
DECEASED = 'deceased'
|
81
|
-
PASSED_AWAY = 'passed_away'
|
82
|
-
OTHER_DECEASED = 'other_deceased'
|
79
|
+
ANGEL = 'angel'.freeze
|
80
|
+
DECEASED = 'deceased'.freeze
|
81
|
+
PASSED_AWAY = 'passed_away'.freeze
|
82
|
+
OTHER_DECEASED = 'other_deceased'.freeze
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
@@ -102,33 +102,33 @@ module SBF
|
|
102
102
|
disallow_instantiation
|
103
103
|
|
104
104
|
module Status
|
105
|
-
ACTIVE = 'active'
|
106
|
-
PENDING = 'pending'
|
107
|
-
SUSPENDED = 'suspended'
|
105
|
+
ACTIVE = 'active'.freeze
|
106
|
+
PENDING = 'pending'.freeze
|
107
|
+
SUSPENDED = 'suspended'.freeze
|
108
108
|
end
|
109
109
|
|
110
110
|
class Relationship < SBF::Client::BaseEntity
|
111
111
|
module Type
|
112
|
-
SELF_ADULT = 'adult'
|
113
|
-
SELF_MINOR = 'minor'
|
114
|
-
MOTHER = 'mother'
|
115
|
-
FATHER = 'father'
|
116
|
-
SISTER = 'sister'
|
117
|
-
BROTHER = 'brother'
|
118
|
-
AUNT = 'aunt'
|
119
|
-
UNCLE = 'uncle'
|
120
|
-
GRANDMOTHER = 'grandmother'
|
121
|
-
GRANDFATHER = 'grandfather'
|
122
|
-
STEP_MOTHER = 'stepmother'
|
123
|
-
STEP_FATHER = 'stepfather'
|
124
|
-
FRIEND = 'friend'
|
125
|
-
COUSIN = 'cousin'
|
112
|
+
SELF_ADULT = 'adult'.freeze
|
113
|
+
SELF_MINOR = 'minor'.freeze
|
114
|
+
MOTHER = 'mother'.freeze
|
115
|
+
FATHER = 'father'.freeze
|
116
|
+
SISTER = 'sister'.freeze
|
117
|
+
BROTHER = 'brother'.freeze
|
118
|
+
AUNT = 'aunt'.freeze
|
119
|
+
UNCLE = 'uncle'.freeze
|
120
|
+
GRANDMOTHER = 'grandmother'.freeze
|
121
|
+
GRANDFATHER = 'grandfather'.freeze
|
122
|
+
STEP_MOTHER = 'stepmother'.freeze
|
123
|
+
STEP_FATHER = 'stepfather'.freeze
|
124
|
+
FRIEND = 'friend'.freeze
|
125
|
+
COUSIN = 'cousin'.freeze
|
126
126
|
end
|
127
127
|
|
128
128
|
module GuardianType
|
129
|
-
LEGAL_GUARDIAN = 'legal_guardian'
|
130
|
-
NONCUSTODIAL_GUARDIAN = 'non_custodial_guardian'
|
131
|
-
OTHER = 'other'
|
129
|
+
LEGAL_GUARDIAN = 'legal_guardian'.freeze
|
130
|
+
NONCUSTODIAL_GUARDIAN = 'non_custodial_guardian'.freeze
|
131
|
+
OTHER = 'other'.freeze
|
132
132
|
end
|
133
133
|
|
134
134
|
class Permissions < SBF::Client::BaseEntity
|
@@ -44,10 +44,10 @@ module SBF
|
|
44
44
|
)
|
45
45
|
|
46
46
|
module HonorerType
|
47
|
-
EVENT = 'event'
|
48
|
-
TEAM = 'team'
|
49
|
-
PARTICIPANT = 'participant'
|
50
|
-
FUNDRAISER = 'fundraiser'
|
47
|
+
EVENT = 'event'.freeze
|
48
|
+
TEAM = 'team'.freeze
|
49
|
+
PARTICIPANT = 'participant'.freeze
|
50
|
+
FUNDRAISER = 'fundraiser'.freeze
|
51
51
|
end
|
52
52
|
|
53
53
|
class PartialKid < SBF::Client::PartialKid
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Require all monkey patches
|
2
2
|
patch_dir = File.expand_path('../../patches', __dir__)
|
3
|
-
Dir["#{patch_dir}/*.rb"].each { |file| require file }
|
3
|
+
Dir["#{patch_dir}/*.rb"].sort.each { |file| require file }
|
4
4
|
|
5
5
|
require 'set'
|
6
6
|
require 'stbaldricks/client'
|
@@ -11,12 +11,8 @@ require 'securerandom'
|
|
11
11
|
module SBF
|
12
12
|
module Client
|
13
13
|
class BaseEntity
|
14
|
-
include ActiveModel::AttributeAssignment
|
15
|
-
|
16
|
-
extend ActiveModel::Naming
|
17
|
-
extend ActiveModel::Translation
|
18
|
-
include ActiveModel::Conversion
|
19
|
-
include EntityResponseConcern
|
14
|
+
include EntityResponseConcern, ActiveModel::Conversion, ActiveModel::Dirty, ActiveModel::AttributeAssignment
|
15
|
+
extend ActiveModel::Translation, ActiveModel::Naming
|
20
16
|
|
21
17
|
attr_reader :errors
|
22
18
|
|
@@ -42,7 +38,7 @@ module SBF
|
|
42
38
|
|
43
39
|
# Overridden from ActiveModel::Naming to remove namespace and Full/Partial
|
44
40
|
def model_name
|
45
|
-
@
|
41
|
+
@model_name ||= ActiveModel::Name.new(self, SBF::Client, self.class.name.gsub(/::(Full|Partial)/, '::'))
|
46
42
|
end
|
47
43
|
|
48
44
|
def persisted?
|
@@ -113,7 +109,7 @@ module SBF
|
|
113
109
|
|
114
110
|
# Mimic ActiveRecord::AttributeAssignment alias
|
115
111
|
alias_method :attributes=, :assign_attributes
|
116
|
-
|
112
|
+
# rubocop:disable Naming/MemoizedInstanceVariableName
|
117
113
|
def initialize_attributes(data)
|
118
114
|
data ||= {}
|
119
115
|
data.each do |key, value|
|
@@ -138,6 +134,7 @@ module SBF
|
|
138
134
|
@collection_attributes ||= Set.new
|
139
135
|
end
|
140
136
|
private :initialize_attributes
|
137
|
+
# rubocop:enable Naming/MemoizedInstanceVariableName
|
141
138
|
|
142
139
|
def mark_attribute_not_provided(name)
|
143
140
|
return if not_provided_attributes.include?(name)
|
@@ -157,18 +154,18 @@ module SBF
|
|
157
154
|
|
158
155
|
# If we set the value in a not_provided method, that means we now have requested the data and we
|
159
156
|
# should replace the original getter/setter and set the value using the original method
|
160
|
-
define_singleton_method(setter)
|
157
|
+
define_singleton_method(setter) do |v|
|
161
158
|
unmark_attribute_not_provided(name)
|
162
159
|
super(v)
|
163
|
-
|
160
|
+
end
|
164
161
|
|
165
162
|
# If we try to get the value in a not_provided method, we should raise an error
|
166
|
-
define_singleton_method(getter)
|
163
|
+
define_singleton_method(getter) do
|
167
164
|
raise(
|
168
165
|
SBF::Client::DataNotProvidedError,
|
169
166
|
"Data not provided for the #{name} attribute. This is usually due to the attribute not being requested in the 'with' declaration"
|
170
167
|
)
|
171
|
-
|
168
|
+
end
|
172
169
|
end
|
173
170
|
private :mark_attribute_not_provided
|
174
171
|
|
@@ -392,7 +389,7 @@ module SBF
|
|
392
389
|
private_class_method :define_changing_attr_methods
|
393
390
|
|
394
391
|
# Creates a private method which resolves the class type based on the class mappings and the value
|
395
|
-
# rubocop:disable MethodLength
|
392
|
+
# rubocop:disable Metrics/MethodLength
|
396
393
|
def self.add_class_selector_method(attribute, class_mappings)
|
397
394
|
method_name = :"select_#{attribute}_class"
|
398
395
|
|
@@ -418,8 +415,8 @@ module SBF
|
|
418
415
|
|
419
416
|
else
|
420
417
|
# No class conversion if the value is already an entity
|
421
|
-
return nil if parsed_class_mappings.any?
|
422
|
-
[c1, c2].compact.any?
|
418
|
+
return nil if parsed_class_mappings.any? do |_, c1, c2|
|
419
|
+
[c1, c2].compact.any? do |allowed_class|
|
423
420
|
if allowed_class.instance_of?(Class)
|
424
421
|
# Otherwise, return true if the value is an instance of the allowed class
|
425
422
|
value.is_a?(allowed_class)
|
@@ -430,15 +427,15 @@ module SBF
|
|
430
427
|
allowed_class.constants.any? { |const_name| allowed_class.const_get(const_name) == value }
|
431
428
|
|
432
429
|
end
|
433
|
-
|
434
|
-
|
430
|
+
end
|
431
|
+
end
|
435
432
|
|
436
433
|
# Convert to child class if given class is a parent of the same name
|
437
|
-
parsed_class_mappings.each
|
438
|
-
[c1, c2].compact.each
|
434
|
+
parsed_class_mappings.each do |_, c1, c2|
|
435
|
+
[c1, c2].compact.each do |allowed_class|
|
439
436
|
return allowed_class if allowed_class.ancestors.find { |a| a == value.class && a.demodulize == value.class.demodulize }
|
440
|
-
|
441
|
-
|
437
|
+
end
|
438
|
+
end
|
442
439
|
|
443
440
|
# Don't know how to handle whatever the user entered. Raise an error.
|
444
441
|
# (Nil and Hash are always valid values)
|
@@ -454,7 +451,7 @@ module SBF
|
|
454
451
|
|
455
452
|
private_class_method method_name
|
456
453
|
end
|
457
|
-
# rubocop:enable MethodLength
|
454
|
+
# rubocop:enable Metrics/MethodLength
|
458
455
|
private_class_method :add_class_selector_method
|
459
456
|
|
460
457
|
def self.get_mappings(attribute, class_mappings)
|
@@ -544,7 +541,7 @@ module SBF
|
|
544
541
|
# Recursively converts an entity into a Hash
|
545
542
|
def to_hash
|
546
543
|
entity_hash = {}
|
547
|
-
self.class.defined_attributes.each
|
544
|
+
self.class.defined_attributes.each do |key|
|
548
545
|
# If the method was not retrieved, do not include it in the hash
|
549
546
|
next if not_provided_attributes.include?(key)
|
550
547
|
|
@@ -557,11 +554,11 @@ module SBF
|
|
557
554
|
|
558
555
|
# If the value is an Array, need to try to call to_hash on each item
|
559
556
|
elsif value.is_a?(Array)
|
560
|
-
value.map
|
557
|
+
value.map do |element|
|
561
558
|
next element.to_hash if element.is_a?(BaseEntity)
|
562
559
|
|
563
560
|
next element
|
564
|
-
|
561
|
+
end
|
565
562
|
|
566
563
|
# Collections should return empty array rather than nil
|
567
564
|
elsif value.nil? && self.class.collection_attributes.include?(key)
|
@@ -572,7 +569,7 @@ module SBF
|
|
572
569
|
value
|
573
570
|
|
574
571
|
end
|
575
|
-
|
572
|
+
end
|
576
573
|
|
577
574
|
# Return the hash
|
578
575
|
entity_hash
|
@@ -27,7 +27,7 @@ module SBF
|
|
27
27
|
SBF::Client::ErrorEntity.new(code: errors.code, type: errors.type, details: details)
|
28
28
|
end
|
29
29
|
|
30
|
-
# rubocop:disable MultipleComparison
|
30
|
+
# rubocop:disable Style/MultipleComparison
|
31
31
|
def [](*args)
|
32
32
|
log_deprecated('[]', caller) if args == [:results] || args == [:total_count]
|
33
33
|
return self if args == [:results]
|
@@ -36,7 +36,7 @@ module SBF
|
|
36
36
|
result = super
|
37
37
|
result.is_a?(Array) ? self.class.new(result, total_count) : result
|
38
38
|
end
|
39
|
-
# rubocop:enable MultipleComparison
|
39
|
+
# rubocop:enable Style/MultipleComparison
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -5,23 +5,23 @@ module SBF
|
|
5
5
|
module Client
|
6
6
|
class Payment
|
7
7
|
module Type
|
8
|
-
UNKNOWN = 'unknown'
|
9
|
-
CREDIT_CARD = 'credit_card'
|
10
|
-
CHECK = 'check'
|
11
|
-
CASH = 'cash'
|
12
|
-
MONEY_ORDER = 'money_order'
|
13
|
-
NONCE = 'nonce'
|
14
|
-
WIRE_TRANSFER = 'wire_transfer'
|
15
|
-
PAYPAL = 'paypal'
|
16
|
-
FACEBOOK = 'facebook'
|
17
|
-
APPLEPAY = 'applepay'
|
8
|
+
UNKNOWN = 'unknown'.freeze
|
9
|
+
CREDIT_CARD = 'credit_card'.freeze
|
10
|
+
CHECK = 'check'.freeze
|
11
|
+
CASH = 'cash'.freeze
|
12
|
+
MONEY_ORDER = 'money_order'.freeze
|
13
|
+
NONCE = 'nonce'.freeze
|
14
|
+
WIRE_TRANSFER = 'wire_transfer'.freeze
|
15
|
+
PAYPAL = 'paypal'.freeze
|
16
|
+
FACEBOOK = 'facebook'.freeze
|
17
|
+
APPLEPAY = 'applepay'.freeze
|
18
18
|
end
|
19
19
|
|
20
20
|
module Gateway
|
21
|
-
NONE = 'none'
|
22
|
-
UNKNOWN = 'unknown'
|
23
|
-
BRAINTREE = 'braintree'
|
24
|
-
PAYMENTSPRING = 'paymentspring'
|
21
|
+
NONE = 'none'.freeze
|
22
|
+
UNKNOWN = 'unknown'.freeze
|
23
|
+
BRAINTREE = 'braintree'.freeze
|
24
|
+
PAYMENTSPRING = 'paymentspring'.freeze
|
25
25
|
end
|
26
26
|
|
27
27
|
class Details < SBF::Client::BaseEntity
|