xero-ruby 3.1.4 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +257 -222
  3. data/lib/xero-ruby/api/accounting_api.rb +11 -2
  4. data/lib/xero-ruby/api/app_store_api.rb +87 -0
  5. data/lib/xero-ruby/api/payroll_au_api.rb +14 -14
  6. data/lib/xero-ruby/api/payroll_nz_api.rb +18 -12
  7. data/lib/xero-ruby/api/payroll_uk_api.rb +14 -2
  8. data/lib/xero-ruby/api_client.rb +35 -6
  9. data/lib/xero-ruby/configuration.rb +2 -0
  10. data/lib/xero-ruby/models/accounting/bank_transfer.rb +35 -1
  11. data/lib/xero-ruby/models/accounting/budget_balance.rb +2 -2
  12. data/lib/xero-ruby/models/accounting/payment.rb +11 -1
  13. data/lib/xero-ruby/models/accounting/time_zone.rb +1 -0
  14. data/lib/xero-ruby/models/app_store/plan.rb +310 -0
  15. data/lib/xero-ruby/models/app_store/price.rb +257 -0
  16. data/lib/xero-ruby/models/app_store/problem_details.rb +272 -0
  17. data/lib/xero-ruby/models/app_store/product.rb +288 -0
  18. data/lib/xero-ruby/models/app_store/subscription.rb +324 -0
  19. data/lib/xero-ruby/models/app_store/subscription_item.rb +292 -0
  20. data/lib/xero-ruby/models/payroll_au/earnings_type.rb +2 -0
  21. data/lib/xero-ruby/models/payroll_au/employee.rb +30 -1
  22. data/lib/xero-ruby/models/payroll_au/manual_tax_type.rb +1 -0
  23. data/lib/xero-ruby/models/payroll_au/payroll_calendar.rb +11 -1
  24. data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +4 -4
  25. data/lib/xero-ruby/version.rb +2 -2
  26. data/lib/xero-ruby.rb +7 -0
  27. data/spec/api_client_spec.rb +25 -2
  28. data/spec/app_store/api/app_store_api_spec.rb +45 -0
  29. data/spec/app_store/models/plan_spec.rb +62 -0
  30. data/spec/app_store/models/price_spec.rb +52 -0
  31. data/spec/app_store/models/problem_details_spec.rb +70 -0
  32. data/spec/app_store/models/product_spec.rb +56 -0
  33. data/spec/app_store/models/subscription_item_spec.rb +70 -0
  34. data/spec/app_store/models/subscription_spec.rb +82 -0
  35. metadata +24 -3
@@ -83,6 +83,16 @@ module XeroRuby::PayrollAu
83
83
  # Employee Termination Date (YYYY-MM-DD)
84
84
  attr_accessor :termination_date
85
85
 
86
+ # * `V` Voluntary cessation - An employee resignation, retirement, domestic or pressing necessity or abandonment of employment * `I` Ill health - An employee resignation due to medical condition that prevents the continuation of employment, such as for illness, ill-health, medical unfitness or total permanent disability * `D` Deceased - The death of an employee * `R` Redundancy - An employer-initiated termination of employment due to a genuine redundancy or approved early retirement scheme * `F` Dismissal - An employer-initiated termination of employment due to dismissal, inability to perform the required work, misconduct or inefficiency * `C` Contract cessation - The natural conclusion of a limited employment relationship due to contract/engagement duration or task completion, seasonal work completion, or to cease casuals that are no longer required * `T` Transfer - The administrative arrangements performed to transfer employees across payroll systems, move them temporarily to another employer (machinery of government for public servants), transfer of business, move them to outsourcing arrangements or other such technical activities.
87
+ attr_accessor :termination_reason
88
+ V = "V".freeze
89
+ # I = "I".freeze
90
+ D = "D".freeze
91
+ R = "R".freeze
92
+ # F = "F".freeze
93
+ C = "C".freeze
94
+ T = "T".freeze
95
+
86
96
 
87
97
  attr_accessor :bank_accounts
88
98
 
@@ -159,6 +169,7 @@ module XeroRuby::PayrollAu
159
169
  :'employee_group_name' => :'EmployeeGroupName',
160
170
  :'employee_id' => :'EmployeeID',
161
171
  :'termination_date' => :'TerminationDate',
172
+ :'termination_reason' => :'TerminationReason',
162
173
  :'bank_accounts' => :'BankAccounts',
163
174
  :'pay_template' => :'PayTemplate',
164
175
  :'opening_balances' => :'OpeningBalances',
@@ -196,6 +207,7 @@ module XeroRuby::PayrollAu
196
207
  :'employee_group_name' => :'String',
197
208
  :'employee_id' => :'String',
198
209
  :'termination_date' => :'Date',
210
+ :'termination_reason' => :'String',
199
211
  :'bank_accounts' => :'Array<BankAccount>',
200
212
  :'pay_template' => :'PayTemplate',
201
213
  :'opening_balances' => :'OpeningBalances',
@@ -308,6 +320,10 @@ module XeroRuby::PayrollAu
308
320
  self.termination_date = attributes[:'termination_date']
309
321
  end
310
322
 
323
+ if attributes.key?(:'termination_reason')
324
+ self.termination_reason = attributes[:'termination_reason']
325
+ end
326
+
311
327
  if attributes.key?(:'bank_accounts')
312
328
  if (value = attributes[:'bank_accounts']).is_a?(Array)
313
329
  self.bank_accounts = value
@@ -386,6 +402,8 @@ module XeroRuby::PayrollAu
386
402
  return false if @date_of_birth.nil?
387
403
  gender_validator = EnumAttributeValidator.new('String', ["N", "M", "F", "I"])
388
404
  return false unless gender_validator.valid?(@gender)
405
+ termination_reason_validator = EnumAttributeValidator.new('String', ["V", "I", "D", "R", "F", "C", "T"])
406
+ return false unless termination_reason_validator.valid?(@termination_reason)
389
407
  true
390
408
  end
391
409
 
@@ -399,6 +417,16 @@ module XeroRuby::PayrollAu
399
417
  @gender = gender
400
418
  end
401
419
 
420
+ # Custom attribute writer method checking allowed values (enum).
421
+ # @param [Object] termination_reason Object to be assigned
422
+ def termination_reason=(termination_reason)
423
+ validator = EnumAttributeValidator.new('String', ["V", "I", "D", "R", "F", "C", "T"])
424
+ unless validator.valid?(termination_reason)
425
+ fail ArgumentError, "invalid value for \"termination_reason\", must be one of #{validator.allowable_values}."
426
+ end
427
+ @termination_reason = termination_reason
428
+ end
429
+
402
430
  # Checks equality by comparing each attribute.
403
431
  # @param [Object] Object to be compared
404
432
  def ==(o)
@@ -425,6 +453,7 @@ module XeroRuby::PayrollAu
425
453
  employee_group_name == o.employee_group_name &&
426
454
  employee_id == o.employee_id &&
427
455
  termination_date == o.termination_date &&
456
+ termination_reason == o.termination_reason &&
428
457
  bank_accounts == o.bank_accounts &&
429
458
  pay_template == o.pay_template &&
430
459
  opening_balances == o.opening_balances &&
@@ -446,7 +475,7 @@ module XeroRuby::PayrollAu
446
475
  # Calculates hash code according to all attributes.
447
476
  # @return [Integer] Hash code
448
477
  def hash
449
- [first_name, last_name, date_of_birth, home_address, start_date, title, middle_names, email, gender, phone, mobile, twitter_user_name, is_authorised_to_approve_leave, is_authorised_to_approve_timesheets, job_title, classification, ordinary_earnings_rate_id, payroll_calendar_id, employee_group_name, employee_id, termination_date, bank_accounts, pay_template, opening_balances, tax_declaration, leave_balances, leave_lines, super_memberships, status, updated_date_utc, validation_errors].hash
478
+ [first_name, last_name, date_of_birth, home_address, start_date, title, middle_names, email, gender, phone, mobile, twitter_user_name, is_authorised_to_approve_leave, is_authorised_to_approve_timesheets, job_title, classification, ordinary_earnings_rate_id, payroll_calendar_id, employee_group_name, employee_id, termination_date, termination_reason, bank_accounts, pay_template, opening_balances, tax_declaration, leave_balances, leave_lines, super_memberships, status, updated_date_utc, validation_errors].hash
450
479
  end
451
480
 
452
481
  # Builds the object from hash
@@ -19,6 +19,7 @@ module XeroRuby::PayrollAu
19
19
  ETPRMANUAL = "ETPRMANUAL".freeze
20
20
  SCHEDULE5_MANUAL = "SCHEDULE5MANUAL".freeze
21
21
  SCHEDULE5_STSLMANUAL = "SCHEDULE5STSLMANUAL".freeze
22
+ SCHEDULE4_MANUAL = "SCHEDULE4MANUAL".freeze
22
23
 
23
24
  # Builds the enum from string
24
25
  # @param [String] The enum value in the form of the string
@@ -34,6 +34,9 @@ module XeroRuby::PayrollAu
34
34
  # Last modified timestamp
35
35
  attr_accessor :updated_date_utc
36
36
 
37
+ # Reference Date (YYYY-MM-DD)
38
+ attr_accessor :reference_date
39
+
37
40
  # Displays array of validation error messages from the API
38
41
  attr_accessor :validation_errors
39
42
 
@@ -46,6 +49,7 @@ module XeroRuby::PayrollAu
46
49
  :'payment_date' => :'PaymentDate',
47
50
  :'payroll_calendar_id' => :'PayrollCalendarID',
48
51
  :'updated_date_utc' => :'UpdatedDateUTC',
52
+ :'reference_date' => :'ReferenceDate',
49
53
  :'validation_errors' => :'ValidationErrors'
50
54
  }
51
55
  end
@@ -59,6 +63,7 @@ module XeroRuby::PayrollAu
59
63
  :'payment_date' => :'Date',
60
64
  :'payroll_calendar_id' => :'String',
61
65
  :'updated_date_utc' => :'DateTime',
66
+ :'reference_date' => :'Date',
62
67
  :'validation_errors' => :'Array<ValidationError>'
63
68
  }
64
69
  end
@@ -102,6 +107,10 @@ module XeroRuby::PayrollAu
102
107
  self.updated_date_utc = attributes[:'updated_date_utc']
103
108
  end
104
109
 
110
+ if attributes.key?(:'reference_date')
111
+ self.reference_date = attributes[:'reference_date']
112
+ end
113
+
105
114
  if attributes.key?(:'validation_errors')
106
115
  if (value = attributes[:'validation_errors']).is_a?(Array)
107
116
  self.validation_errors = value
@@ -133,6 +142,7 @@ module XeroRuby::PayrollAu
133
142
  payment_date == o.payment_date &&
134
143
  payroll_calendar_id == o.payroll_calendar_id &&
135
144
  updated_date_utc == o.updated_date_utc &&
145
+ reference_date == o.reference_date &&
136
146
  validation_errors == o.validation_errors
137
147
  end
138
148
 
@@ -145,7 +155,7 @@ module XeroRuby::PayrollAu
145
155
  # Calculates hash code according to all attributes.
146
156
  # @return [Integer] Hash code
147
157
  def hash
148
- [name, calendar_type, start_date, payment_date, payroll_calendar_id, updated_date_utc, validation_errors].hash
158
+ [name, calendar_type, start_date, payment_date, payroll_calendar_id, updated_date_utc, reference_date, validation_errors].hash
149
159
  end
150
160
 
151
161
  # Builds the object from hash
@@ -44,8 +44,8 @@ module XeroRuby::PayrollUk
44
44
  STATUTORY_SHARED_PARENTAL_PAY_NON_PENSIONABLE = "StatutorySharedParentalPayNonPensionable".freeze
45
45
  STATUTORY_SICK_PAY = "StatutorySickPay".freeze
46
46
  STATUTORY_SICK_PAY_NON_PENSIONABLE = "StatutorySickPayNonPensionable".freeze
47
- TIPS_DIRECT = "Tips(Direct)".freeze
48
- TIPS_NON_DIRECT = "Tips(Non-Direct)".freeze
47
+ TIPS_NON_DIRECT = "TipsNonDirect".freeze
48
+ TIPS_DIRECT = "TipsDirect".freeze
49
49
  TERMINATION_PAY = "TerminationPay".freeze
50
50
 
51
51
  # Indicates the type of the earning rate
@@ -214,7 +214,7 @@ module XeroRuby::PayrollUk
214
214
  def valid?
215
215
  return false if @name.nil?
216
216
  return false if @earnings_type.nil?
217
- earnings_type_validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "Tips(Direct)", "Tips(Non-Direct)", "TerminationPay"])
217
+ earnings_type_validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "TipsNonDirect", "TipsDirect", "TerminationPay"])
218
218
  return false unless earnings_type_validator.valid?(@earnings_type)
219
219
  return false if @rate_type.nil?
220
220
  rate_type_validator = EnumAttributeValidator.new('String', ["RatePerUnit", "MultipleOfOrdinaryEarningsRate", "FixedAmount"])
@@ -227,7 +227,7 @@ module XeroRuby::PayrollUk
227
227
  # Custom attribute writer method checking allowed values (enum).
228
228
  # @param [Object] earnings_type Object to be assigned
229
229
  def earnings_type=(earnings_type)
230
- validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "Tips(Direct)", "Tips(Non-Direct)", "TerminationPay"])
230
+ validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "TipsNonDirect", "TipsDirect", "TerminationPay"])
231
231
  unless validator.valid?(earnings_type)
232
232
  fail ArgumentError, "invalid value for \"earnings_type\", must be one of #{validator.allowable_values}."
233
233
  end
@@ -7,9 +7,9 @@ Contact: api@xero.com
7
7
  Generated by: https://openapi-generator.tech
8
8
  OpenAPI Generator version: 4.3.1
9
9
 
10
- The version of the XeroOpenAPI document: 2.13.2
10
+ The version of the XeroOpenAPI document: 2.17.1
11
11
  =end
12
12
 
13
13
  module XeroRuby
14
- VERSION = '3.1.4'
14
+ VERSION = '3.4.0'
15
15
  end
data/lib/xero-ruby.rb CHANGED
@@ -18,6 +18,12 @@ require 'xero-ruby/version'
18
18
  require 'xero-ruby/configuration'
19
19
 
20
20
  # Models
21
+ require 'xero-ruby/models/app_store/plan'
22
+ require 'xero-ruby/models/app_store/price'
23
+ require 'xero-ruby/models/app_store/problem_details'
24
+ require 'xero-ruby/models/app_store/product'
25
+ require 'xero-ruby/models/app_store/subscription'
26
+ require 'xero-ruby/models/app_store/subscription_item'
21
27
  require 'xero-ruby/models/payroll_uk/account'
22
28
  require 'xero-ruby/models/payroll_uk/accounts'
23
29
  require 'xero-ruby/models/payroll_uk/address'
@@ -456,6 +462,7 @@ require 'xero-ruby/models/accounting/users'
456
462
  require 'xero-ruby/models/accounting/validation_error'
457
463
 
458
464
  # APIs
465
+ require 'xero-ruby/api/app_store_api'
459
466
  require 'xero-ruby/api/payroll_uk_api'
460
467
  require 'xero-ruby/api/payroll_nz_api'
461
468
  require 'xero-ruby/api/payroll_au_api'
@@ -47,7 +47,7 @@ describe XeroRuby::ApiClient do
47
47
  state: 'i-am-customer-state'
48
48
  }
49
49
  api_client = XeroRuby::ApiClient.new(credentials: creds)
50
- expect(api_client.authorization_url).to eq('https://login.xero.com/identity/connect/authorize?response_type=code&client_id=abc&redirect_uri=https://mydomain.com/callback&scope=openid+profile+email+accounting.transactions+accounting.settings&state=i-am-customer-state')
50
+ expect(api_client.authorization_url).to eq('https://login.xero.com/identity/connect/authorize?response_type=code&client_id=abc&redirect_uri=https%3A%2F%2Fmydomain.com%2Fcallback&scope=openid+profile+email+accounting.transactions+accounting.settings&state=i-am-customer-state')
51
51
  end
52
52
 
53
53
  it "Does not append state if it is not provided" do
@@ -58,7 +58,7 @@ describe XeroRuby::ApiClient do
58
58
  scopes: 'openid profile email accounting.transactions accounting.settings'
59
59
  }
60
60
  api_client = XeroRuby::ApiClient.new(credentials: creds)
61
- expect(api_client.authorization_url).to eq('https://login.xero.com/identity/connect/authorize?response_type=code&client_id=abc&redirect_uri=https://mydomain.com/callback&scope=openid+profile+email+accounting.transactions+accounting.settings')
61
+ expect(api_client.authorization_url).to eq('https://login.xero.com/identity/connect/authorize?response_type=code&client_id=abc&redirect_uri=https%3A%2F%2Fmydomain.com%2Fcallback&scope=openid+profile+email+accounting.transactions+accounting.settings')
62
62
  end
63
63
 
64
64
  it "Validates state on callback matches @config.state" do
@@ -74,6 +74,29 @@ describe XeroRuby::ApiClient do
74
74
  expect{api_client.validate_state(altered_state)}.to raise_error(StandardError, 'WARNING: @config.state: custom-state and OAuth callback state: do not match!')
75
75
  end
76
76
  end
77
+
78
+ context "Creates a valid client_credentials client" do
79
+
80
+ it "But still defaults to grant_type: authorization_code" do
81
+ creds = {
82
+ client_id: 'abc',
83
+ client_secret: '123',
84
+ }
85
+ api_client = XeroRuby::ApiClient.new(credentials: creds)
86
+ expect(api_client.grant_type).to eq('authorization_code')
87
+ end
88
+
89
+ it "Sets grant_type correctly" do
90
+ creds = {
91
+ client_id: 'abc',
92
+ client_secret: '123',
93
+ grant_type: 'client_credentials'
94
+ }
95
+ api_client = XeroRuby::ApiClient.new(credentials: creds)
96
+ expect(api_client.grant_type).to eq('client_credentials')
97
+ end
98
+
99
+ end
77
100
  end
78
101
  end
79
102
 
@@ -0,0 +1,45 @@
1
+ =begin
2
+ #Xero AppStore API
3
+
4
+ #These endpoints are for Xero Partners to interact with the App Store Billing platform
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for XeroRuby::AppStore::AppStoreApi
16
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
17
+ # Please update as you see appropriate
18
+ describe 'AppStoreApi' do
19
+ before do
20
+ # run before each test
21
+ @api_instance = XeroRuby::AppStoreApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of AppStoreApi' do
29
+ it 'should create an instance of AppStoreApi' do
30
+ expect(@api_instance).to be_instance_of(XeroRuby::AppStoreApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for get_subscription
35
+ # Retrieves a subscription for a given subscriptionId
36
+ # @param subscription_id Unique identifier for Subscription object
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Subscription]
39
+ describe 'get_subscription test' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ end
43
+ end
44
+
45
+ end
@@ -0,0 +1,62 @@
1
+ =begin
2
+ #Xero AppStore API
3
+
4
+ #These endpoints are for Xero Partners to interact with the App Store Billing platform
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for XeroRuby::AppStore::Plan
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'Plan' do
20
+ before do
21
+ # run before each test
22
+ @instance = XeroRuby::AppStore::Plan.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of Plan' do
30
+ it 'should create an instance of Plan' do
31
+ expect(@instance).to be_instance_of(XeroRuby::AppStore::Plan)
32
+ end
33
+ end
34
+ describe 'test attribute "id"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "name"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "status"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PENDING_ACTIVATION"])
50
+ # validator.allowable_values.each do |value|
51
+ # expect { @instance.status = value }.not_to raise_error
52
+ # end
53
+ end
54
+ end
55
+
56
+ describe 'test attribute "subscription_items"' do
57
+ it 'should work' do
58
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
59
+ end
60
+ end
61
+
62
+ end
@@ -0,0 +1,52 @@
1
+ =begin
2
+ #Xero AppStore API
3
+
4
+ #These endpoints are for Xero Partners to interact with the App Store Billing platform
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for XeroRuby::AppStore::Price
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'Price' do
20
+ before do
21
+ # run before each test
22
+ @instance = XeroRuby::AppStore::Price.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of Price' do
30
+ it 'should create an instance of Price' do
31
+ expect(@instance).to be_instance_of(XeroRuby::AppStore::Price)
32
+ end
33
+ end
34
+ describe 'test attribute "amount"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "currency"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "id"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ end
@@ -0,0 +1,70 @@
1
+ =begin
2
+ #Xero AppStore API
3
+
4
+ #These endpoints are for Xero Partners to interact with the App Store Billing platform
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for XeroRuby::AppStore::ProblemDetails
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'ProblemDetails' do
20
+ before do
21
+ # run before each test
22
+ @instance = XeroRuby::AppStore::ProblemDetails.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ProblemDetails' do
30
+ it 'should create an instance of ProblemDetails' do
31
+ expect(@instance).to be_instance_of(XeroRuby::AppStore::ProblemDetails)
32
+ end
33
+ end
34
+ describe 'test attribute "detail"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "extensions"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "instance"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "status"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'test attribute "title"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "type"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
70
+ end
@@ -0,0 +1,56 @@
1
+ =begin
2
+ #Xero AppStore API
3
+
4
+ #These endpoints are for Xero Partners to interact with the App Store Billing platform
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for XeroRuby::AppStore::Product
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'Product' do
20
+ before do
21
+ # run before each test
22
+ @instance = XeroRuby::AppStore::Product.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of Product' do
30
+ it 'should create an instance of Product' do
31
+ expect(@instance).to be_instance_of(XeroRuby::AppStore::Product)
32
+ end
33
+ end
34
+ describe 'test attribute "id"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "name"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "type"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["FIXED", "PER_SEAT"])
50
+ # validator.allowable_values.each do |value|
51
+ # expect { @instance.type = value }.not_to raise_error
52
+ # end
53
+ end
54
+ end
55
+
56
+ end
@@ -0,0 +1,70 @@
1
+ =begin
2
+ #Xero AppStore API
3
+
4
+ #These endpoints are for Xero Partners to interact with the App Store Billing platform
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for XeroRuby::AppStore::SubscriptionItem
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'SubscriptionItem' do
20
+ before do
21
+ # run before each test
22
+ @instance = XeroRuby::AppStore::SubscriptionItem.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of SubscriptionItem' do
30
+ it 'should create an instance of SubscriptionItem' do
31
+ expect(@instance).to be_instance_of(XeroRuby::AppStore::SubscriptionItem)
32
+ end
33
+ end
34
+ describe 'test attribute "end_date"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "id"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "price"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "product"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'test attribute "start_date"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "test_mode"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
70
+ end