Skip to content

Latest commit

 

History

History
624 lines (425 loc) · 13.7 KB

File metadata and controls

624 lines (425 loc) · 13.7 KB

BmxApiRuby::ContractApi

All URIs are relative to https://localhost:3000/api/v1

Method HTTP request Description
get_contract GET /contract List all contracts
get_contract_uuid GET /contract/{uuid} Show contract detail
get_contract_uuid_amendments GET /contract/{uuid}/amendments Show contract amendments
get_contract_uuid_escrows GET /contract/{uuid}/escrows Show contract escrows
get_contract_uuid_open_offers GET /contract/{uuid}/open_offers Show contract open_offers
get_contract_uuid_positions GET /contract/{uuid}/positions Show contract positions
post_contract_contract_uuid_cancel POST /contract/{contract_uuid}/cancel Cancel contract
post_contract_contract_uuid_clone POST /contract/{contract_uuid}/clone Clone contract
post_contract_create POST /contract/create Create contract
post_contract_offer_uuid_cross POST /contract/{offer_uuid}/cross Cross offer
put_contract_uuid_resolve PUT /contract/{uuid}/resolve Resolve contract

get_contract

Array<ContractIds> get_contract

List all contracts

List all contracts

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

begin
  #List all contracts
  result = api_instance.get_contract
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->get_contract: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

Array<ContractIds>

Authorization

base

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_contract_uuid

ContractDetail get_contract_uuid(uuid)

Show contract detail

Show contract detail

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

uuid = 56 # Integer | 


begin
  #Show contract detail
  result = api_instance.get_contract_uuid(uuid)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->get_contract_uuid: #{e}"
end

Parameters

Name Type Description Notes
uuid Integer

Return type

ContractDetail

Authorization

base

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_contract_uuid_amendments

Array<AmendmentDetail> get_contract_uuid_amendments(uuid)

Show contract amendments

Show contract amendments

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

uuid = 56 # Integer | 


begin
  #Show contract amendments
  result = api_instance.get_contract_uuid_amendments(uuid)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->get_contract_uuid_amendments: #{e}"
end

Parameters

Name Type Description Notes
uuid Integer

Return type

Array<AmendmentDetail>

Authorization

base

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_contract_uuid_escrows

Array<EscrowDetail> get_contract_uuid_escrows(uuid)

Show contract escrows

Show contract escrows

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

uuid = 56 # Integer | 


begin
  #Show contract escrows
  result = api_instance.get_contract_uuid_escrows(uuid)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->get_contract_uuid_escrows: #{e}"
end

Parameters

Name Type Description Notes
uuid Integer

Return type

Array<EscrowDetail>

Authorization

base

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_contract_uuid_open_offers

Array<OfferDetail> get_contract_uuid_open_offers(uuid)

Show contract open_offers

Show contract open_offers

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

uuid = 56 # Integer | 


begin
  #Show contract open_offers
  result = api_instance.get_contract_uuid_open_offers(uuid)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->get_contract_uuid_open_offers: #{e}"
end

Parameters

Name Type Description Notes
uuid Integer

Return type

Array<OfferDetail>

Authorization

base

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_contract_uuid_positions

Array<PositionDetail> get_contract_uuid_positions(uuid)

Show contract positions

Show contract positions

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

uuid = 56 # Integer | 


begin
  #Show contract positions
  result = api_instance.get_contract_uuid_positions(uuid)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->get_contract_uuid_positions: #{e}"
end

Parameters

Name Type Description Notes
uuid Integer

Return type

Array<PositionDetail>

Authorization

base

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

post_contract_contract_uuid_cancel

ContractStatus post_contract_contract_uuid_cancel(contract_uuid)

Cancel contract

Cancel contract

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

contract_uuid = 56 # Integer | 


begin
  #Cancel contract
  result = api_instance.post_contract_contract_uuid_cancel(contract_uuid)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->post_contract_contract_uuid_cancel: #{e}"
end

Parameters

Name Type Description Notes
contract_uuid Integer

Return type

ContractStatus

Authorization

base

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

post_contract_contract_uuid_clone

ContractStatus post_contract_contract_uuid_clone(contract_uuid, opts)

Clone contract

Clone contract

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

contract_uuid = 56 # Integer | 

opts = { 
  issue: "issue_example", # String | issue UUID
  tracker: "tracker_example", # String | tracker UUID
  title: "title_example", # String | title
  status: "status_example", # String | status
  labels: "labels_example", # String | labels
  maturation: "maturation_example" # String | YYMMDD_HHMM (default now + 1.week)
}

begin
  #Clone contract
  result = api_instance.post_contract_contract_uuid_clone(contract_uuid, opts)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->post_contract_contract_uuid_clone: #{e}"
end

Parameters

Name Type Description Notes
contract_uuid Integer
issue String issue UUID [optional]
tracker String tracker UUID [optional]
title String title [optional]
status String status [optional]
labels String labels [optional]
maturation String YYMMDD_HHMM (default now + 1.week) [optional]

Return type

ContractStatus

Authorization

base

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

post_contract_create

ContractStatus post_contract_create(opts)

Create contract

Create contract

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

opts = { 
  issue: "issue_example", # String | issue UUID
  tracker: "tracker_example", # String | tracker UUID
  title: "title_example", # String | title
  status: "status_example", # String | status
  labels: "labels_example", # String | labels
  maturation: "maturation_example" # String | YYMMDD_HHMM (default now + 1.week)
}

begin
  #Create contract
  result = api_instance.post_contract_create(opts)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->post_contract_create: #{e}"
end

Parameters

Name Type Description Notes
issue String issue UUID [optional]
tracker String tracker UUID [optional]
title String title [optional]
status String status [optional]
labels String labels [optional]
maturation String YYMMDD_HHMM (default now + 1.week) [optional]

Return type

ContractStatus

Authorization

base

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

post_contract_offer_uuid_cross

ContractStatus post_contract_offer_uuid_cross(commit_type, offer_uuid)

Cross offer

Cross offer

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

commit_type = "commit_type_example" # String | expand, transfer or reduce

offer_uuid = 56 # Integer | 


begin
  #Cross offer
  result = api_instance.post_contract_offer_uuid_cross(commit_type, offer_uuid)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->post_contract_offer_uuid_cross: #{e}"
end

Parameters

Name Type Description Notes
commit_type String expand, transfer or reduce
offer_uuid Integer

Return type

ContractStatus

Authorization

base

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

put_contract_uuid_resolve

ContractStatus put_contract_uuid_resolve(uuid)

Resolve contract

Resolve contract

Example

# load the gem
require 'bmx_api_ruby'
# setup authorization
BmxApiRuby.configure do |config|
  # Configure HTTP basic authorization: base
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = BmxApiRuby::ContractApi.new

uuid = 56 # Integer | 


begin
  #Resolve contract
  result = api_instance.put_contract_uuid_resolve(uuid)
  p result
rescue BmxApiRuby::ApiError => e
  puts "Exception when calling ContractApi->put_contract_uuid_resolve: #{e}"
end

Parameters

Name Type Description Notes
uuid Integer

Return type

ContractStatus

Authorization

base

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json