Skip to content

Commit

Permalink
hosting.get_parallelswpb_constructor_url
Browse files Browse the repository at this point in the history
  • Loading branch information
akzhan committed Jun 24, 2014
1 parent d491950 commit 8cc1604
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -94,7 +94,7 @@ Please follow these links to view documentation on methods of all known API cate
| [bill](http://regru.github.io/reg_api2-ruby/RegApi2/Bill.html) | Billing |
| [folder](http://regru.github.io/reg_api2-ruby/RegApi2/Folder.html) | Folders for services including domains |
| [zone](http://regru.github.io/reg_api2-ruby/RegApi2/Zone.html) | Domain zone resource records (DNS) |
| [hosting](http://regru.github.io/reg_api2-ruby/RegApi2/Hosting.html) | Jelastic hosting ops at now |
| [hosting](http://regru.github.io/reg_api2-ruby/RegApi2/Hosting.html) | Hosting management functions |
| [shop](http://regru.github.io/reg_api2-ruby/RegApi2/Shop.html) | Domain Shop management functions |

## Recommendations for effective use of REG.API
Expand Down
10 changes: 10 additions & 0 deletions lib/reg_api2/hosting.rb
Expand Up @@ -35,6 +35,16 @@ module Hosting
# RegApi2.set_jelastic_refill_url url: 'http://mysite.com?service_id=<service_id>&email=<email>'
define :set_jelastic_refill_url, required: :url

# @!method get_parallelswpb_constructor_url(opts = {})
# @param [Hash] opts
# @option opts [Fixnum] :service_id Numeric service identifier.
# get URL to the ParallelsWPB constructor.
# @return [String] URL for ParallelsWPB constructor..
# @note Accessibility: partners
# @example Typical usage
# RegApi2.set_jelastic_refill_url url: 'http://mysite.com?service_id=<service_id>&email=<email>'
define :get_parallelswpb_constructor_url, required: { service_id: {} }, field: :url

extend self
end
end
5 changes: 5 additions & 0 deletions spec/lib/reg_api2/hosting_spec.rb
Expand Up @@ -22,4 +22,9 @@
end
end

describe :get_parallelswpb_constructor_url do
xit "should return \"https://test1.ru\"" do
expect(hosting.get_parallelswpb_constructor_url(service_id: 123456)).to eq("https://test1.ru")
end
end
end

0 comments on commit 8cc1604

Please sign in to comment.