tangocard-raas 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +175 -0
  3. data/README.md +542 -0
  4. data/lib/raas.rb +61 -0
  5. data/lib/raas/api_helper.rb +181 -0
  6. data/lib/raas/configuration.rb +72 -0
  7. data/lib/raas/controllers/accounts_controller.rb +189 -0
  8. data/lib/raas/controllers/base_controller.rb +68 -0
  9. data/lib/raas/controllers/catalog_controller.rb +47 -0
  10. data/lib/raas/controllers/customers_controller.rb +137 -0
  11. data/lib/raas/controllers/exchange_rates_controller.rb +36 -0
  12. data/lib/raas/controllers/orders_controller.rb +199 -0
  13. data/lib/raas/controllers/status_controller.rb +46 -0
  14. data/lib/raas/exceptions/api_exception.rb +16 -0
  15. data/lib/raas/exceptions/raas_client_exception.rb +58 -0
  16. data/lib/raas/exceptions/raas_generic_exception.rb +53 -0
  17. data/lib/raas/exceptions/raas_server_exception.rb +58 -0
  18. data/lib/raas/http/auth/basic_auth.rb +17 -0
  19. data/lib/raas/http/faraday_client.rb +43 -0
  20. data/lib/raas/http/http_call_back.rb +17 -0
  21. data/lib/raas/http/http_client.rb +84 -0
  22. data/lib/raas/http/http_context.rb +15 -0
  23. data/lib/raas/http/http_method_enum.rb +7 -0
  24. data/lib/raas/http/http_request.rb +44 -0
  25. data/lib/raas/http/http_response.rb +19 -0
  26. data/lib/raas/models/account_model.rb +88 -0
  27. data/lib/raas/models/account_summary_model.rb +61 -0
  28. data/lib/raas/models/base_model.rb +32 -0
  29. data/lib/raas/models/brand_model.rb +129 -0
  30. data/lib/raas/models/catalog_model.rb +47 -0
  31. data/lib/raas/models/create_account_request_model.rb +51 -0
  32. data/lib/raas/models/create_customer_request_model.rb +42 -0
  33. data/lib/raas/models/create_order_request_model.rb +132 -0
  34. data/lib/raas/models/currency_breakdown_model.rb +69 -0
  35. data/lib/raas/models/customer_model.rb +75 -0
  36. data/lib/raas/models/exchange_rate_model.rb +61 -0
  37. data/lib/raas/models/exchange_rate_response_model.rb +47 -0
  38. data/lib/raas/models/get_orders_response_model.rb +47 -0
  39. data/lib/raas/models/item_model.rb +133 -0
  40. data/lib/raas/models/name_email_model.rb +51 -0
  41. data/lib/raas/models/order_model.rb +187 -0
  42. data/lib/raas/models/page_model.rb +60 -0
  43. data/lib/raas/models/raas_client_error_model.rb +60 -0
  44. data/lib/raas/models/raas_server_error_model.rb +42 -0
  45. data/lib/raas/models/resend_order_response_model.rb +43 -0
  46. data/lib/raas/models/reward_credential_model.rb +51 -0
  47. data/lib/raas/models/reward_model.rb +56 -0
  48. data/lib/raas/models/system_status_response_model.rb +33 -0
  49. data/lib/raas/raas_client.rb +53 -0
  50. metadata +175 -0
@@ -0,0 +1,51 @@
1
+ # This file was automatically generated for Tango Card, Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Raas
4
+ class RewardCredentialModel < BaseModel
5
+ # Credential Label
6
+ # @return [String]
7
+ attr_accessor :label
8
+
9
+ # Credential Value
10
+ # @return [String]
11
+ attr_accessor :value
12
+
13
+ # Credential Type
14
+ # @return [String]
15
+ attr_accessor :type
16
+
17
+ # A mapping from model property names to API property names
18
+ def self.names
19
+ if @_hash.nil?
20
+ @_hash = {}
21
+ @_hash["label"] = "label"
22
+ @_hash["value"] = "value"
23
+ @_hash["type"] = "type"
24
+ end
25
+ @_hash
26
+ end
27
+
28
+ def initialize(label = nil,
29
+ value = nil,
30
+ type = nil)
31
+ @label = label
32
+ @value = value
33
+ @type = type
34
+ end
35
+
36
+ # Creates an instance of the object from a hash
37
+ def self.from_hash(hash)
38
+ return nil unless hash
39
+
40
+ # Extract variables from the hash
41
+ label = hash['label']
42
+ value = hash['value']
43
+ type = hash['type']
44
+
45
+ # Create object from extracted values
46
+ RewardCredentialModel.new(label,
47
+ value,
48
+ type)
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,56 @@
1
+ # This file was automatically generated for Tango Card, Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Raas
4
+ class RewardModel < BaseModel
5
+ # A map of reward credentials
6
+ # @return [Array<String, String>]
7
+ attr_accessor :credentials
8
+
9
+ # An array of reward credentials
10
+ # @return [List of RewardCredentialModel]
11
+ attr_accessor :credential_list
12
+
13
+ # Reward redemption instructions
14
+ # @return [String]
15
+ attr_accessor :redemption_instructions
16
+
17
+ # A mapping from model property names to API property names
18
+ def self.names
19
+ if @_hash.nil?
20
+ @_hash = {}
21
+ @_hash["credentials"] = "credentials"
22
+ @_hash["credential_list"] = "credentialList"
23
+ @_hash["redemption_instructions"] = "redemptionInstructions"
24
+ end
25
+ @_hash
26
+ end
27
+
28
+ def initialize(credentials = nil,
29
+ credential_list = nil,
30
+ redemption_instructions = nil)
31
+ @credentials = credentials
32
+ @credential_list = credential_list
33
+ @redemption_instructions = redemption_instructions
34
+ end
35
+
36
+ # Creates an instance of the object from a hash
37
+ def self.from_hash(hash)
38
+ return nil unless hash
39
+
40
+ # Extract variables from the hash
41
+ credentials = hash['credentials']
42
+ # Parameter is an array, so we need to iterate through it
43
+ credential_list = nil
44
+ if hash['credentialList'] != nil
45
+ credential_list = Array.new
46
+ hash['credentialList'].each{|structure| credential_list << (RewardCredentialModel.from_hash(structure) if structure)}
47
+ end
48
+ redemption_instructions = hash['redemptionInstructions']
49
+
50
+ # Create object from extracted values
51
+ RewardModel.new(credentials,
52
+ credential_list,
53
+ redemption_instructions)
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,33 @@
1
+ # This file was automatically generated for Tango Card, Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Raas
4
+ class SystemStatusResponseModel < BaseModel
5
+ # System Status
6
+ # @return [String]
7
+ attr_accessor :status
8
+
9
+ # A mapping from model property names to API property names
10
+ def self.names
11
+ if @_hash.nil?
12
+ @_hash = {}
13
+ @_hash["status"] = "status"
14
+ end
15
+ @_hash
16
+ end
17
+
18
+ def initialize(status = nil)
19
+ @status = status
20
+ end
21
+
22
+ # Creates an instance of the object from a hash
23
+ def self.from_hash(hash)
24
+ return nil unless hash
25
+
26
+ # Extract variables from the hash
27
+ status = hash['status']
28
+
29
+ # Create object from extracted values
30
+ SystemStatusResponseModel.new(status)
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,53 @@
1
+ # This file was automatically generated for Tango Card, Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Raas
4
+ class RaasClient
5
+ # Singleton access to accounts controller
6
+ # @return [AccountsController] Returns the controller instance
7
+ def accounts
8
+ AccountsController.instance
9
+ end
10
+
11
+ # Singleton access to orders controller
12
+ # @return [OrdersController] Returns the controller instance
13
+ def orders
14
+ OrdersController.instance
15
+ end
16
+
17
+ # Singleton access to catalog controller
18
+ # @return [CatalogController] Returns the controller instance
19
+ def catalog
20
+ CatalogController.instance
21
+ end
22
+
23
+ # Singleton access to exchange_rates controller
24
+ # @return [ExchangeRatesController] Returns the controller instance
25
+ def exchange_rates
26
+ ExchangeRatesController.instance
27
+ end
28
+
29
+ # Singleton access to status controller
30
+ # @return [StatusController] Returns the controller instance
31
+ def status
32
+ StatusController.instance
33
+ end
34
+
35
+ # Singleton access to customers controller
36
+ # @return [CustomersController] Returns the controller instance
37
+ def customers
38
+ CustomersController.instance
39
+ end
40
+
41
+ # Returns the configuration class for easy access
42
+ # @return [Configuration] Returns the actual configuration class
43
+ def config
44
+ Configuration
45
+ end
46
+
47
+ # Initializer with authentication and configuration parameters
48
+ def initialize(platform_name: 'QAPlatform2', platform_key: 'apYPfT6HNONpDRUj3CLGWYt7gvIHONpDRUYPfT6Hj')
49
+ Configuration.platform_name = platform_name if platform_name
50
+ Configuration.platform_key = platform_key if platform_key
51
+ end
52
+ end
53
+ end
metadata ADDED
@@ -0,0 +1,175 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tangocard-raas
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Tango Card, Inc.
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-07-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: logging
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.10.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.10.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: test-unit
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.1.5
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.1.5
55
+ - !ruby/object:Gem::Dependency
56
+ name: certifi
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2016.9'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 2016.09.26
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '2016.9'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 2016.09.26
75
+ - !ruby/object:Gem::Dependency
76
+ name: faraday-http-cache
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '1.2'
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 1.2.2
85
+ type: :runtime
86
+ prerelease: false
87
+ version_requirements: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '1.2'
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 1.2.2
95
+ description: With this RESTful API you can integrate a global reward or incentive
96
+ program into your app or platform. If you have any questions or if you would like
97
+ to receive your own credentials, please contact us at devsupport@tangocard.com.
98
+ email: devsupport@tangocard.com
99
+ executables: []
100
+ extensions: []
101
+ extra_rdoc_files: []
102
+ files:
103
+ - LICENSE
104
+ - README.md
105
+ - lib/raas.rb
106
+ - lib/raas/api_helper.rb
107
+ - lib/raas/configuration.rb
108
+ - lib/raas/controllers/accounts_controller.rb
109
+ - lib/raas/controllers/base_controller.rb
110
+ - lib/raas/controllers/catalog_controller.rb
111
+ - lib/raas/controllers/customers_controller.rb
112
+ - lib/raas/controllers/exchange_rates_controller.rb
113
+ - lib/raas/controllers/orders_controller.rb
114
+ - lib/raas/controllers/status_controller.rb
115
+ - lib/raas/exceptions/api_exception.rb
116
+ - lib/raas/exceptions/raas_client_exception.rb
117
+ - lib/raas/exceptions/raas_generic_exception.rb
118
+ - lib/raas/exceptions/raas_server_exception.rb
119
+ - lib/raas/http/auth/basic_auth.rb
120
+ - lib/raas/http/faraday_client.rb
121
+ - lib/raas/http/http_call_back.rb
122
+ - lib/raas/http/http_client.rb
123
+ - lib/raas/http/http_context.rb
124
+ - lib/raas/http/http_method_enum.rb
125
+ - lib/raas/http/http_request.rb
126
+ - lib/raas/http/http_response.rb
127
+ - lib/raas/models/account_model.rb
128
+ - lib/raas/models/account_summary_model.rb
129
+ - lib/raas/models/base_model.rb
130
+ - lib/raas/models/brand_model.rb
131
+ - lib/raas/models/catalog_model.rb
132
+ - lib/raas/models/create_account_request_model.rb
133
+ - lib/raas/models/create_customer_request_model.rb
134
+ - lib/raas/models/create_order_request_model.rb
135
+ - lib/raas/models/currency_breakdown_model.rb
136
+ - lib/raas/models/customer_model.rb
137
+ - lib/raas/models/exchange_rate_model.rb
138
+ - lib/raas/models/exchange_rate_response_model.rb
139
+ - lib/raas/models/get_orders_response_model.rb
140
+ - lib/raas/models/item_model.rb
141
+ - lib/raas/models/name_email_model.rb
142
+ - lib/raas/models/order_model.rb
143
+ - lib/raas/models/page_model.rb
144
+ - lib/raas/models/raas_client_error_model.rb
145
+ - lib/raas/models/raas_server_error_model.rb
146
+ - lib/raas/models/resend_order_response_model.rb
147
+ - lib/raas/models/reward_credential_model.rb
148
+ - lib/raas/models/reward_model.rb
149
+ - lib/raas/models/system_status_response_model.rb
150
+ - lib/raas/raas_client.rb
151
+ homepage: https://www.tangocard.com
152
+ licenses:
153
+ - Apache-2.0
154
+ metadata: {}
155
+ post_install_message:
156
+ rdoc_options: []
157
+ require_paths:
158
+ - lib
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - "~>"
162
+ - !ruby/object:Gem::Version
163
+ version: '2.0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ requirements: []
170
+ rubyforge_project:
171
+ rubygems_version: 2.6.11
172
+ signing_key:
173
+ specification_version: 4
174
+ summary: Tango Card RaaS v2 SDK
175
+ test_files: []