Skip to content

Commit

Permalink
Update SDK to reflect optional order alllocations array (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
alianam authored Jan 11, 2022
1 parent 49fd71c commit 44a5554
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.17.0] - 2022-01-11

### Changed

- Set the order allocatations array as optional.

## [1.16.1] - 2022-01-07

### Changed
Expand Down
5 changes: 3 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
patch_ruby (1.16.1)
patch_ruby (1.17.0)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand All @@ -22,7 +22,7 @@ GEM
ffi (>= 1.15.0)
factory_bot (6.2.0)
activesupport (>= 5.0.0)
ffi (1.15.4)
ffi (1.15.5)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
Expand Down Expand Up @@ -71,6 +71,7 @@ GEM

PLATFORMS
arm64-darwin-20
arm64-darwin-21
x86_64-darwin-20

DEPENDENCIES
Expand Down
2 changes: 1 addition & 1 deletion lib/patch_ruby/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ApiClient
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
def initialize(config = Configuration.default)
@config = config
@user_agent = "patch-ruby/1.16.1"
@user_agent = "patch-ruby/1.17.0"
@default_headers = {
'Content-Type' => 'application/json',
'User-Agent' => @user_agent
Expand Down
7 changes: 1 addition & 6 deletions lib/patch_ruby/models/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Order
# The Patch Fee in cents USD for this order.
attr_accessor :patch_fee_cents_usd

# An array containing the inventory allocations for this order.
# DEPRECATED. An array containing the inventory allocations for this order.
attr_accessor :allocations

# The url of this order in the public registry.
Expand Down Expand Up @@ -223,10 +223,6 @@ def list_invalid_properties
invalid_properties.push('invalid value for "allocation_state", allocation_state cannot be nil.')
end

if @allocations.nil?
invalid_properties.push('invalid value for "allocations", allocations cannot be nil.')
end

if @metadata.nil?
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
end
Expand All @@ -248,7 +244,6 @@ def valid?
return false if @allocation_state.nil?
allocation_state_validator = EnumAttributeValidator.new('String', ["pending", "allocated"])
return false unless allocation_state_validator.valid?(@allocation_state)
return false if @allocations.nil?
return false if @metadata.nil?
true
end
Expand Down
2 changes: 1 addition & 1 deletion lib/patch_ruby/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Project
# The description of the project.
attr_accessor :description

# Deprecated. Favor the technology_type field instead.
# DEPRECATED. Favor the technology_type field instead.
attr_accessor :type

# The mechanism of the project. Either removal or avoidance.
Expand Down
2 changes: 1 addition & 1 deletion lib/patch_ruby/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module Patch
VERSION = '1.16.1'
VERSION = '1.17.0'
end

0 comments on commit 44a5554

Please sign in to comment.