stbaldricks 1.5.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/lib/stbaldricks.rb +2 -0
- data/lib/stbaldricks/api.rb +7 -0
- data/lib/stbaldricks/api_connector.rb +47 -0
- data/lib/stbaldricks/client.rb +7 -0
- data/lib/stbaldricks/configuration.rb +47 -0
- data/lib/stbaldricks/default_logger.rb +24 -0
- data/lib/stbaldricks/endpoints/communicate.rb +67 -0
- data/lib/stbaldricks/endpoints/config.rb +18 -0
- data/lib/stbaldricks/endpoints/contact.rb +12 -0
- data/lib/stbaldricks/endpoints/event.rb +39 -0
- data/lib/stbaldricks/endpoints/event_application.rb +32 -0
- data/lib/stbaldricks/endpoints/fund.rb +24 -0
- data/lib/stbaldricks/endpoints/kid.rb +24 -0
- data/lib/stbaldricks/endpoints/kid_honor.rb +17 -0
- data/lib/stbaldricks/endpoints/lib/entity.rb +247 -0
- data/lib/stbaldricks/endpoints/message.rb +27 -0
- data/lib/stbaldricks/endpoints/newsletter_recipient.rb +41 -0
- data/lib/stbaldricks/endpoints/participant.rb +66 -0
- data/lib/stbaldricks/endpoints/photo.rb +51 -0
- data/lib/stbaldricks/endpoints/recurring_gift.rb +18 -0
- data/lib/stbaldricks/endpoints/search.rb +63 -0
- data/lib/stbaldricks/endpoints/shave_schedule.rb +28 -0
- data/lib/stbaldricks/endpoints/user.rb +106 -0
- data/lib/stbaldricks/entities/batch.rb +29 -0
- data/lib/stbaldricks/entities/campaign.rb +37 -0
- data/lib/stbaldricks/entities/communicate.rb +20 -0
- data/lib/stbaldricks/entities/config.rb +41 -0
- data/lib/stbaldricks/entities/contact.rb +40 -0
- data/lib/stbaldricks/entities/contact_group.rb +29 -0
- data/lib/stbaldricks/entities/document_library.rb +19 -0
- data/lib/stbaldricks/entities/document_library_category.rb +14 -0
- data/lib/stbaldricks/entities/donation.rb +372 -0
- data/lib/stbaldricks/entities/donation/donor_type.rb +13 -0
- data/lib/stbaldricks/entities/donation/how_created.rb +22 -0
- data/lib/stbaldricks/entities/donation/payment_type.rb +17 -0
- data/lib/stbaldricks/entities/donation/promo_code.rb +22 -0
- data/lib/stbaldricks/entities/donation/recipient_type.rb +17 -0
- data/lib/stbaldricks/entities/donation/special_donation_type.rb +78 -0
- data/lib/stbaldricks/entities/donation/status.rb +12 -0
- data/lib/stbaldricks/entities/donation/submitter_type.rb +13 -0
- data/lib/stbaldricks/entities/donor.rb +15 -0
- data/lib/stbaldricks/entities/event.rb +173 -0
- data/lib/stbaldricks/entities/event/fund_relationship_type.rb +15 -0
- data/lib/stbaldricks/entities/event/how_created.rb +14 -0
- data/lib/stbaldricks/entities/event/promo_code.rb +11 -0
- data/lib/stbaldricks/entities/event/status.rb +13 -0
- data/lib/stbaldricks/entities/event/sub_type.rb +16 -0
- data/lib/stbaldricks/entities/event/type.rb +12 -0
- data/lib/stbaldricks/entities/event_application.rb +135 -0
- data/lib/stbaldricks/entities/event_application/model_type.rb +15 -0
- data/lib/stbaldricks/entities/event_application/status.rb +23 -0
- data/lib/stbaldricks/entities/event_donation_summary.rb +18 -0
- data/lib/stbaldricks/entities/event_participant_summary.rb +17 -0
- data/lib/stbaldricks/entities/event_supporter.rb +24 -0
- data/lib/stbaldricks/entities/fund.rb +98 -0
- data/lib/stbaldricks/entities/fundraiser.rb +124 -0
- data/lib/stbaldricks/entities/international_partner.rb +58 -0
- data/lib/stbaldricks/entities/kid.rb +190 -0
- data/lib/stbaldricks/entities/kid_honor.rb +123 -0
- data/lib/stbaldricks/entities/lib/address.rb +25 -0
- data/lib/stbaldricks/entities/lib/base.rb +505 -0
- data/lib/stbaldricks/entities/lib/cacheable.rb +43 -0
- data/lib/stbaldricks/entities/lib/default_cacheable.rb +17 -0
- data/lib/stbaldricks/entities/lib/email_address.rb +15 -0
- data/lib/stbaldricks/entities/lib/error.rb +38 -0
- data/lib/stbaldricks/entities/lib/fundraising_page.rb +20 -0
- data/lib/stbaldricks/entities/lib/geo_location.rb +9 -0
- data/lib/stbaldricks/entities/lib/location.rb +27 -0
- data/lib/stbaldricks/entities/lib/name.rb +17 -0
- data/lib/stbaldricks/entities/lib/not_implemented_object.rb +32 -0
- data/lib/stbaldricks/entities/lib/opt_out_settings.rb +21 -0
- data/lib/stbaldricks/entities/lib/payment.rb +86 -0
- data/lib/stbaldricks/entities/lib/permissions.rb +33 -0
- data/lib/stbaldricks/entities/lib/phone.rb +29 -0
- data/lib/stbaldricks/entities/lib/third_party_media.rb +20 -0
- data/lib/stbaldricks/entities/lib/top_level.rb +99 -0
- data/lib/stbaldricks/entities/lib/venue.rb +18 -0
- data/lib/stbaldricks/entities/memorial.rb +61 -0
- data/lib/stbaldricks/entities/message.rb +65 -0
- data/lib/stbaldricks/entities/newsletter_recipient.rb +17 -0
- data/lib/stbaldricks/entities/organization.rb +90 -0
- data/lib/stbaldricks/entities/page.rb +49 -0
- data/lib/stbaldricks/entities/participant.rb +216 -0
- data/lib/stbaldricks/entities/person.rb +403 -0
- data/lib/stbaldricks/entities/photo.rb +260 -0
- data/lib/stbaldricks/entities/recurring_gift.rb +215 -0
- data/lib/stbaldricks/entities/response.rb +37 -0
- data/lib/stbaldricks/entities/search.rb +223 -0
- data/lib/stbaldricks/entities/section.rb +15 -0
- data/lib/stbaldricks/entities/shave_schedule.rb +69 -0
- data/lib/stbaldricks/entities/summary.rb +32 -0
- data/lib/stbaldricks/entities/team.rb +95 -0
- data/lib/stbaldricks/entities/user.rb +76 -0
- data/lib/stbaldricks/enums/country.rb +223 -0
- data/lib/stbaldricks/enums/feature.rb +29 -0
- data/lib/stbaldricks/enums/league_status.rb +16 -0
- data/lib/stbaldricks/enums/model_type.rb +39 -0
- data/lib/stbaldricks/enums/permission.rb +223 -0
- data/lib/stbaldricks/enums/permission_model_type.rb +21 -0
- data/lib/stbaldricks/enums/province.rb +39 -0
- data/lib/stbaldricks/enums/state.rb +137 -0
- data/lib/stbaldricks/enums/top_level_category_type.rb +25 -0
- data/lib/stbaldricks/errors.rb +18 -0
- data/lib/stbaldricks/log.rb +16 -0
- data/lib/stbaldricks/patches/array.rb +6 -0
- data/lib/stbaldricks/patches/boolean.rb +25 -0
- data/lib/stbaldricks/patches/class.rb +13 -0
- data/lib/stbaldricks/patches/float.rb +9 -0
- data/lib/stbaldricks/patches/hash.rb +16 -0
- data/lib/stbaldricks/patches/integer.rb +9 -0
- data/lib/stbaldricks/patches/nil.rb +25 -0
- data/lib/stbaldricks/patches/string.rb +54 -0
- data/lib/stbaldricks/request.rb +146 -0
- data/lib/stbaldricks/version.rb +5 -0
- metadata +215 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'stbaldricks/entities/lib/top_level'
|
2
|
+
|
3
|
+
module SBF
|
4
|
+
module Client
|
5
|
+
class Section < SBF::Client::TopLevelEntity
|
6
|
+
actions DEFAULT_CRUD_ACTIONS
|
7
|
+
|
8
|
+
attr_reader :id
|
9
|
+
attr_accessor :title
|
10
|
+
attr_accessor :pages
|
11
|
+
attr_accessor :parent_section
|
12
|
+
attr_accessor :subsections
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'stbaldricks/endpoints/shave_schedule'
|
2
|
+
require 'stbaldricks/entities/lib/top_level'
|
3
|
+
require 'stbaldricks/entities/lib/permissions'
|
4
|
+
|
5
|
+
module SBF
|
6
|
+
module Client
|
7
|
+
class ShaveSchedule < SBF::Client::TopLevelEntity
|
8
|
+
endpoint SBF::Client::ShaveScheduleEndpoint
|
9
|
+
actions DEFAULT_CRUD_ACTIONS
|
10
|
+
action :notify
|
11
|
+
|
12
|
+
def update(with = {})
|
13
|
+
endpoint.update(id, year, self, with)
|
14
|
+
end
|
15
|
+
|
16
|
+
class TimeSelectionPermissions < SBF::Client::BaseEntity
|
17
|
+
attr_accessor :shavees, :team_captains
|
18
|
+
|
19
|
+
def shavees?
|
20
|
+
shavees
|
21
|
+
end
|
22
|
+
|
23
|
+
def team_captains?
|
24
|
+
team_captains
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
class ShaveScheduleAssignment < SBF::Client::BaseEntity
|
29
|
+
module Type
|
30
|
+
RESERVED = 'reserved'
|
31
|
+
SHAVEE = 'shavee'
|
32
|
+
end
|
33
|
+
|
34
|
+
attr_accessor :id
|
35
|
+
attr_accessor :type
|
36
|
+
attr_accessor :participant
|
37
|
+
attr_accessor :is_notification_sent
|
38
|
+
attr_accessor :shave_time
|
39
|
+
end
|
40
|
+
|
41
|
+
attr_accessor :id
|
42
|
+
attr_accessor :year
|
43
|
+
attr_accessor :start_time
|
44
|
+
attr_accessor :end_time
|
45
|
+
attr_accessor :shave_duration_in_minutes
|
46
|
+
attr_accessor :number_of_seats
|
47
|
+
attr_accessor :is_published
|
48
|
+
entity_attr_accessor :time_selection_permissions, 'SBF::Client::ShaveSchedule::TimeSelectionPermissions'
|
49
|
+
entity_collection_attr_accessor :assignments, 'SBF::Client::ShaveSchedule::ShaveScheduleAssignment'
|
50
|
+
entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, true
|
51
|
+
|
52
|
+
def published?
|
53
|
+
is_published
|
54
|
+
end
|
55
|
+
|
56
|
+
def shavees_can_schedule_times?
|
57
|
+
time_selection_permissions.shavees?
|
58
|
+
end
|
59
|
+
|
60
|
+
def team_captains_can_schedule_times?
|
61
|
+
time_selection_permissions.team_captains?
|
62
|
+
end
|
63
|
+
|
64
|
+
def owner?
|
65
|
+
@permissions.nil? ? false : @permissions.owner?
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'stbaldricks/entities/lib/base'
|
2
|
+
require 'stbaldricks/entities/lib/top_level'
|
3
|
+
require 'stbaldricks/entities/lib/cacheable'
|
4
|
+
|
5
|
+
module SBF
|
6
|
+
module Client
|
7
|
+
class Summary < SBF::Client::TopLevelEntity
|
8
|
+
include Entities::Cacheable
|
9
|
+
action :find
|
10
|
+
action :find_first
|
11
|
+
|
12
|
+
cache_id -> { [year] }
|
13
|
+
cache_id_from_hash ->(h) { [h[:year]] }
|
14
|
+
|
15
|
+
attr_accessor :year
|
16
|
+
|
17
|
+
entity_attr_reader :yearly_totals, 'SBF::Client::Summary::Totals'
|
18
|
+
entity_attr_reader :monthly_totals, 'SBF::Client::Summary::Totals'
|
19
|
+
entity_attr_reader :weekly_totals, 'SBF::Client::Summary::Totals'
|
20
|
+
|
21
|
+
class Totals < SBF::Client::BaseEntity
|
22
|
+
attr_reader :donations
|
23
|
+
attr_reader :events
|
24
|
+
attr_reader :male_shavees
|
25
|
+
attr_reader :female_shavees
|
26
|
+
attr_reader :barbers
|
27
|
+
attr_reader :participants
|
28
|
+
attr_reader :fundraisers
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'stbaldricks/entities/participant'
|
2
|
+
require 'stbaldricks/entities/fund'
|
3
|
+
require 'stbaldricks/entities/event'
|
4
|
+
require 'stbaldricks/entities/lib/top_level'
|
5
|
+
require 'stbaldricks/entities/lib/fundraising_page'
|
6
|
+
require 'stbaldricks/entities/lib/permissions'
|
7
|
+
require 'htmlentities'
|
8
|
+
|
9
|
+
module SBF
|
10
|
+
module Client
|
11
|
+
class Team < SBF::Client::TopLevelEntity
|
12
|
+
actions DEFAULT_CRUD_ACTIONS
|
13
|
+
|
14
|
+
blacklist_action :create
|
15
|
+
|
16
|
+
disallow_instantiation
|
17
|
+
|
18
|
+
module Status
|
19
|
+
ACTIVE = 'active'
|
20
|
+
PENDING = 'pending'
|
21
|
+
end
|
22
|
+
|
23
|
+
module HowCreated
|
24
|
+
WEBSITE = 'website'
|
25
|
+
ADMIN_IMPORT = 'admin_import'
|
26
|
+
ADMIN_CONTROL_PANEL = 'admin_control_panel'
|
27
|
+
MOBILE = 'mobile'
|
28
|
+
PARTICIPANT_IMPORT = 'participant_import'
|
29
|
+
end
|
30
|
+
|
31
|
+
module FundRelationshipType
|
32
|
+
NO_ASSOCIATION = 'no_association'
|
33
|
+
INDIRECT_ONE = 'indirect_one'
|
34
|
+
INDIRECT_MULTIPLE = 'indirect_multiple'
|
35
|
+
DIRECT = 'direct'
|
36
|
+
DIRECT_BUT_LOCKED = 'direct_but_locked'
|
37
|
+
INHERITED_EVENT = 'inherited_event'
|
38
|
+
end
|
39
|
+
|
40
|
+
class Photos < SBF::Client::BaseEntity
|
41
|
+
attr_reader :avatar, :default
|
42
|
+
end
|
43
|
+
|
44
|
+
class Totals < SBF::Client::BaseEntity
|
45
|
+
attr_reader :fundraisers, :participants, :shavees, :amount_raised
|
46
|
+
end
|
47
|
+
|
48
|
+
class Rankings < SBF::Client::BaseEntity
|
49
|
+
class Ranking < SBF::Client::BaseEntity
|
50
|
+
attr_reader :rank, :total
|
51
|
+
end
|
52
|
+
|
53
|
+
entity_attr_reader :event, 'SBF::Client::Team::Rankings::Ranking'
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class PartialTeam < Team
|
58
|
+
attr_accessor :id
|
59
|
+
end
|
60
|
+
|
61
|
+
class FullTeam < Team
|
62
|
+
attr_accessor :id
|
63
|
+
attr_accessor :name
|
64
|
+
attr_accessor :status
|
65
|
+
attr_reader :display_name
|
66
|
+
entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent', true
|
67
|
+
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
|
68
|
+
attr_accessor :fund_relationship_type
|
69
|
+
attr_accessor :offline_donation_uuid, :offline_donation_form
|
70
|
+
attr_accessor :fundraising_goal, :fundraising_message
|
71
|
+
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
|
72
|
+
entity_attr_reader :photos, 'SBF::Client::Team::Photos'
|
73
|
+
entity_attr_accessor :captain, 'SBF::Client::FullParticipant'
|
74
|
+
entity_attr_reader :rankings, 'SBF::Client::Team::Rankings', nil, true
|
75
|
+
entity_attr_reader :totals, 'SBF::Client::Team::Totals'
|
76
|
+
attr_reader :created_at, :modified_at
|
77
|
+
attr_accessor :modified_by
|
78
|
+
attr_accessor :how_created
|
79
|
+
entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, true
|
80
|
+
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
|
81
|
+
|
82
|
+
def active?
|
83
|
+
status == SBF::Client::Team::Status::ACTIVE
|
84
|
+
end
|
85
|
+
|
86
|
+
def display_name
|
87
|
+
HTMLEntities.new.decode(@display_name)
|
88
|
+
end
|
89
|
+
|
90
|
+
def name
|
91
|
+
HTMLEntities.new.decode(@name)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'stbaldricks/endpoints/user'
|
2
|
+
require 'stbaldricks/entities/person'
|
3
|
+
require 'stbaldricks/entities/organization'
|
4
|
+
require 'stbaldricks/entities/lib/top_level'
|
5
|
+
require 'stbaldricks/entities/lib/cacheable'
|
6
|
+
|
7
|
+
module SBF
|
8
|
+
module Client
|
9
|
+
class User < SBF::Client::TopLevelEntity
|
10
|
+
include Entities::Cacheable
|
11
|
+
|
12
|
+
endpoint SBF::Client::UserEndpoint
|
13
|
+
actions DEFAULT_CRUD_ACTIONS
|
14
|
+
action :login!
|
15
|
+
action :list_entities_user_has_permission
|
16
|
+
action :change_password
|
17
|
+
action :disconnect_facebook
|
18
|
+
|
19
|
+
cache_id -> { [person.id, type] }
|
20
|
+
cache_id_from_hash ->(h) { [h[:person][:id], h[:type]] }
|
21
|
+
|
22
|
+
module AccessScope
|
23
|
+
ADMIN = 'admin'
|
24
|
+
LIMITED_ADMIN = 'admin_limited'
|
25
|
+
MEMBER = 'member'
|
26
|
+
end
|
27
|
+
|
28
|
+
module ProviderType
|
29
|
+
SBF = 'sbf'
|
30
|
+
FACEBOOK = 'facebook'
|
31
|
+
TWITTER = 'twitter'
|
32
|
+
|
33
|
+
IDS = {
|
34
|
+
SBF => 1,
|
35
|
+
FACEBOOK => 2,
|
36
|
+
TWITTER => 3
|
37
|
+
}
|
38
|
+
IDS.default = 0
|
39
|
+
IDS.freeze
|
40
|
+
|
41
|
+
def self.to_s(type_id)
|
42
|
+
IDS.key(type_id)
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.value_of(type)
|
46
|
+
IDS[type]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
attr_accessor :type, :access_scope, :username, :password, :token, :identifier
|
51
|
+
|
52
|
+
multitype_attr_accessor(
|
53
|
+
:person,
|
54
|
+
[
|
55
|
+
[
|
56
|
+
->(v) { v[:type] == SBF::Client::Organization::Type::ORGANIZATION_FOUNDATION },
|
57
|
+
'SBF::Client::FullOrganization',
|
58
|
+
'SBF::Client::PartialOrganization'
|
59
|
+
],
|
60
|
+
[
|
61
|
+
->(v) { v[:type] == SBF::Client::Organization::Type::BUSINESS },
|
62
|
+
'SBF::Client::FullOrganization',
|
63
|
+
'SBF::Client::PartialOrganization'
|
64
|
+
],
|
65
|
+
[
|
66
|
+
ELSE,
|
67
|
+
'SBF::Client::FullPerson',
|
68
|
+
'SBF::Client::PartialPerson'
|
69
|
+
]
|
70
|
+
]
|
71
|
+
)
|
72
|
+
|
73
|
+
attr_reader :created_at, :modified_at, :last_login_at
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,223 @@
|
|
1
|
+
module SBF
|
2
|
+
module Client
|
3
|
+
module Country
|
4
|
+
AMERICAN_SAMOA = 'American Samoa'
|
5
|
+
ANGUILLA = 'Anguilla'
|
6
|
+
ANTIGUA_AND_BARBUDA = 'Antigua And Barbuda'
|
7
|
+
ARGENTINA = 'Argentina'
|
8
|
+
ARMENIA = 'Armenia'
|
9
|
+
ARUBA = 'Aruba'
|
10
|
+
AUSTRALIA = 'Australia'
|
11
|
+
AUSTRIA = 'Austria'
|
12
|
+
AZERBAIJAN = 'Azerbaijan'
|
13
|
+
BAHAMAS = 'Bahamas'
|
14
|
+
BAHRAIN = 'Bahrain'
|
15
|
+
BARBADOS = 'Barbados'
|
16
|
+
BELARUS = 'Belarus'
|
17
|
+
BELGIUM = 'Belgium'
|
18
|
+
BELIZE = 'Belize'
|
19
|
+
BERMUDA = 'Bermuda'
|
20
|
+
BRAZIL = 'Brazil'
|
21
|
+
BULGARIA = 'Bulgaria'
|
22
|
+
CANADA = 'Canada'
|
23
|
+
CAYMAN_ISLANDS = 'Cayman Islands'
|
24
|
+
CHILE = 'Chile'
|
25
|
+
CHINA = 'China'
|
26
|
+
COLUMBIA = 'Colombia'
|
27
|
+
COSTA_RICA = 'Costa Rica'
|
28
|
+
CUBA = 'Cuba'
|
29
|
+
CURACAO = 'Curacao'
|
30
|
+
CYPRUS = 'Cyprus'
|
31
|
+
CZECH_REPUBLIC = 'Czech Republic'
|
32
|
+
DENMARK = 'Denmark'
|
33
|
+
DOMINICA = 'Dominica'
|
34
|
+
DOMINICAN_REPUBLIC = 'Dominican Republic'
|
35
|
+
ECUADOR = 'Ecuador'
|
36
|
+
EGYPT = 'Egypt'
|
37
|
+
EL_SALVADOR = 'El Salvador'
|
38
|
+
FINLAND = 'Finland'
|
39
|
+
FRANCE = 'France'
|
40
|
+
GERMANY = 'Germany'
|
41
|
+
GREECE = 'Greece'
|
42
|
+
GRENADA = 'Grenada'
|
43
|
+
HAITI = 'Haiti'
|
44
|
+
HONDURAS = 'Honduras'
|
45
|
+
HONG_KONG = 'Hong Kong'
|
46
|
+
HUNGARY = 'Hungary'
|
47
|
+
ICELAND = 'Iceland'
|
48
|
+
INDIA = 'India'
|
49
|
+
INDONESIA = 'Indonesia'
|
50
|
+
IRAN = 'Iran'
|
51
|
+
IRAQ = 'Iraq'
|
52
|
+
IRELAND = 'Ireland'
|
53
|
+
ISRAEL = 'Israel'
|
54
|
+
ITALY = 'Italy'
|
55
|
+
JAMAICA = 'Jamaica'
|
56
|
+
JAPAN = 'Japan'
|
57
|
+
KENYA = 'KE'
|
58
|
+
KUWAIT = 'Kuwait'
|
59
|
+
LEBANON = 'Lebanon'
|
60
|
+
LUXEMBOURG = 'Luxembourg'
|
61
|
+
MACAO = 'Macao'
|
62
|
+
MALAWI = 'Malawi'
|
63
|
+
MALAYSIA = 'Malaysia'
|
64
|
+
MEXICO = 'Mexico'
|
65
|
+
MOLDOVA = 'Moldova'
|
66
|
+
MONTSERRAT = 'Montserrat'
|
67
|
+
NETHERLANDS = 'Netherlands (The)'
|
68
|
+
NEW_ZEALAND = 'New Zealand'
|
69
|
+
NICARAGUA = 'Nicaragua'
|
70
|
+
NORWAY = 'Norway'
|
71
|
+
OMAN = 'Oman'
|
72
|
+
PAKISTAN = 'Pakistan'
|
73
|
+
PERU = 'Peru'
|
74
|
+
PHILIPPINES = 'Philippines'
|
75
|
+
POLAND = 'Poland'
|
76
|
+
PORTUGAL = 'Portugal'
|
77
|
+
QATAR = 'Qatar'
|
78
|
+
ROMANIA = 'Romania'
|
79
|
+
RUSSIA = 'Russia'
|
80
|
+
SAINT_KITTS_AND_NEVIS = 'Saint Kitts And Nevis'
|
81
|
+
SAINT_LUCIA = 'Saint Lucia'
|
82
|
+
SAINT_MARTIN = 'Saint Martin'
|
83
|
+
SAINT_VINCENT_AND_THE_GRENADINES = 'Saint Vincent And The Grenadines'
|
84
|
+
SAUDI_ARABIA = 'Saudi Arabia'
|
85
|
+
SINGAPORE = 'Singapore'
|
86
|
+
SINT_MARTIN = 'Sint Martin'
|
87
|
+
SLOVAKIA = 'Slovakia'
|
88
|
+
SLOVENIA = 'Slovenia'
|
89
|
+
SOUTH_AFRICA = 'South Africa'
|
90
|
+
SOUTH_KOREA = 'South Korea'
|
91
|
+
SPAIN = 'Spain'
|
92
|
+
SRI_LANKA = 'Sri Lanka'
|
93
|
+
SWEDEN = 'Sweden'
|
94
|
+
SWITZERLAND = 'Switzerland'
|
95
|
+
TAIWAN = 'Taiwan'
|
96
|
+
THAILAND = 'Thailand'
|
97
|
+
TRINIDAD_AND_TOBAGO = 'Trinidad And Tobago'
|
98
|
+
TURKEY = 'Turkey'
|
99
|
+
TURKS_AND_CAICOS_ISLANDS = 'Turks And Caicos Islands'
|
100
|
+
UGANDA = 'Uganda'
|
101
|
+
UKRAINE = 'Ukraine'
|
102
|
+
UNITED_ARAB_EMIRATES = 'United Arab Emirates'
|
103
|
+
UNITED_KINGDOM = 'United Kingdom'
|
104
|
+
UNITED_STATES = 'United States'
|
105
|
+
URUGUAY = 'Uruguay'
|
106
|
+
VENEZUELA = 'Venezuela'
|
107
|
+
VIETNAM = 'Vietnam'
|
108
|
+
VIRGIN_ISLANDS_BRITISH = 'Virgin Islands (British)'
|
109
|
+
|
110
|
+
@list = {
|
111
|
+
UNITED_STATES => :US,
|
112
|
+
AMERICAN_SAMOA => :AS,
|
113
|
+
ANGUILLA => :AI,
|
114
|
+
ANTIGUA_AND_BARBUDA => :AG,
|
115
|
+
ARGENTINA => :AR,
|
116
|
+
ARMENIA => :AM,
|
117
|
+
ARUBA => :AW,
|
118
|
+
AUSTRALIA => :AU,
|
119
|
+
AUSTRIA => :AT,
|
120
|
+
AZERBAIJAN => :AZ,
|
121
|
+
BAHAMAS => :BS,
|
122
|
+
BAHRAIN => :BH,
|
123
|
+
BARBADOS => :BB,
|
124
|
+
BELARUS => :BY,
|
125
|
+
BELGIUM => :BE,
|
126
|
+
BELIZE => :BZ,
|
127
|
+
BERMUDA => :BM,
|
128
|
+
BRAZIL => :BR,
|
129
|
+
BULGARIA => :BG,
|
130
|
+
CANADA => :CA,
|
131
|
+
CAYMAN_ISLANDS => :KY,
|
132
|
+
CHILE => :CL,
|
133
|
+
CHINA => :CN,
|
134
|
+
COLUMBIA => :CO,
|
135
|
+
COSTA_RICA => :CR,
|
136
|
+
CUBA => :CU,
|
137
|
+
CURACAO => :CW,
|
138
|
+
CYPRUS => :CY,
|
139
|
+
CZECH_REPUBLIC => :CZ,
|
140
|
+
DENMARK => :DK,
|
141
|
+
DOMINICA => :DM,
|
142
|
+
DOMINICAN_REPUBLIC => :DO,
|
143
|
+
ECUADOR => :EC,
|
144
|
+
EGYPT => :EG,
|
145
|
+
EL_SALVADOR => :SV,
|
146
|
+
FINLAND => :FI,
|
147
|
+
FRANCE => :FR,
|
148
|
+
GERMANY => :DE,
|
149
|
+
GREECE => :GR,
|
150
|
+
GRENADA => :GD,
|
151
|
+
HAITI => :HT,
|
152
|
+
HONDURAS => :HN,
|
153
|
+
HONG_KONG => :HK,
|
154
|
+
HUNGARY => :HU,
|
155
|
+
ICELAND => :IS,
|
156
|
+
INDIA => :IN,
|
157
|
+
INDONESIA => :ID,
|
158
|
+
IRAN => :IR,
|
159
|
+
IRAQ => :IQ,
|
160
|
+
IRELAND => :IE,
|
161
|
+
ISRAEL => :IL,
|
162
|
+
ITALY => :IT,
|
163
|
+
JAMAICA => :JM,
|
164
|
+
JAPAN => :JP,
|
165
|
+
KENYA => :KE,
|
166
|
+
KUWAIT => :KW,
|
167
|
+
LEBANON => :LB,
|
168
|
+
LUXEMBOURG => :LU,
|
169
|
+
MACAO => :MO,
|
170
|
+
MALAWI => :MW,
|
171
|
+
MALAYSIA => :MY,
|
172
|
+
MEXICO => :MX,
|
173
|
+
MOLDOVA => :MD,
|
174
|
+
MONTSERRAT => :MS,
|
175
|
+
NETHERLANDS => :NL,
|
176
|
+
NEW_ZEALAND => :NZ,
|
177
|
+
NICARAGUA => :NI,
|
178
|
+
NORWAY => :NO,
|
179
|
+
OMAN => :OM,
|
180
|
+
PAKISTAN => :PK,
|
181
|
+
PERU => :PE,
|
182
|
+
PHILIPPINES => :PH,
|
183
|
+
POLAND => :PL,
|
184
|
+
PORTUGAL => :PT,
|
185
|
+
QATAR => :QA,
|
186
|
+
ROMANIA => :RO,
|
187
|
+
RUSSIA => :RU,
|
188
|
+
SAINT_KITTS_AND_NEVIS => :KN,
|
189
|
+
SAINT_LUCIA => :LC,
|
190
|
+
SAINT_MARTIN => :MF,
|
191
|
+
SAINT_VINCENT_AND_THE_GRENADINES => :VC,
|
192
|
+
SAUDI_ARABIA => :SA,
|
193
|
+
SINGAPORE => :SG,
|
194
|
+
SINT_MARTIN => :SX,
|
195
|
+
SLOVAKIA => :SK,
|
196
|
+
SLOVENIA => :SI,
|
197
|
+
SOUTH_AFRICA => :ZA,
|
198
|
+
SOUTH_KOREA => :KR,
|
199
|
+
SPAIN => :ES,
|
200
|
+
SRI_LANKA => :LK,
|
201
|
+
SWEDEN => :SE,
|
202
|
+
SWITZERLAND => :CH,
|
203
|
+
TAIWAN => :TW,
|
204
|
+
THAILAND => :TH,
|
205
|
+
TRINIDAD_AND_TOBAGO => :TT,
|
206
|
+
TURKEY => :TR,
|
207
|
+
TURKS_AND_CAICOS_ISLANDS => :TC,
|
208
|
+
UGANDA => :UG,
|
209
|
+
UKRAINE => :UA,
|
210
|
+
UNITED_ARAB_EMIRATES => :AE,
|
211
|
+
UNITED_KINGDOM => :UK,
|
212
|
+
URUGUAY => :UY,
|
213
|
+
VENEZUELA => :VE,
|
214
|
+
VIETNAM => :VN,
|
215
|
+
VIRGIN_ISLANDS_BRITISH => :VG
|
216
|
+
}.freeze
|
217
|
+
|
218
|
+
class << self
|
219
|
+
attr_reader :list
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|