-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from rallets-network/business-api
Add BUSINESS service
- Loading branch information
Showing
4 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Aliyun | ||
class BusinessConfig < APIConfig | ||
def self.info | ||
"Aliyu Business Service" | ||
end | ||
def self.endpoint | ||
'https://business.aliyuncs.com/' | ||
end | ||
def self.default_parameters | ||
{ | ||
:Format=>"JSON", | ||
:Version=>"2017-12-14", | ||
:SignatureMethod=>"HMAC-SHA1", | ||
:SignatureVersion=>"1.0" | ||
} | ||
end | ||
def self.separator | ||
super | ||
end | ||
def self.http_method | ||
super | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require 'spec_helper' | ||
|
||
describe Aliyun do | ||
it 'can create aliyun business service' do | ||
options = load_options | ||
options[:service] = :business | ||
service = Aliyun::Service.new options | ||
|
||
expect(service).to be_instance_of(Aliyun::Service) | ||
expect(service.service).to be(Aliyun::BusinessConfig) | ||
end | ||
end |