Class: Soaspec::TestServer::Invoices

Inherits:
Object
  • Object
show all
Defined in:
lib/soaspec/test_server/invoices.rb

Overview

Used to simulate requests requiring oauth authentication

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.user_usedObject

Returns the value of attribute user_used.



10
11
12
# File 'lib/soaspec/test_server/invoices.rb', line 10

def user_used
  @user_used
end

Class Method Details

.oauth_bodyObject



18
19
20
21
22
23
24
25
# File 'lib/soaspec/test_server/invoices.rb', line 18

def oauth_body
  {
    access_token: 'TEST_TOKENiIsImtpZCI6IlRFU1QifQ.AAAABBBBRfaWQiOiJhYWQ5MjY3SIMULATE_LARGE_TOKEN3MmM5OGQ5NGE2YTU5YSIsImV4cCI6MTUyNzU3MTY4Mywic2NvcGUiOltdfQ.3OmCdW7fLZMUST_BE_ABLE_TO_HANDLEgAGaJB0lFYyhaw',
    token_type: 'Bearer',
    expires_in: '86399',
    instance_url: %w[http://this_is_my_instance http://this_is_second_instance].sample
  }
end

.oauth_headersObject



12
13
14
15
16
# File 'lib/soaspec/test_server/invoices.rb', line 12

def oauth_headers
  {
    'Content-Type' => 'application/json;charset=UTF-8'
  }
end