@@ -9,28 +9,27 @@ module Schema
99 "additionalProperties" => { "not" => { } , "x-error" => "unsupported_key" } ,
1010 "x-error" => { "type" => "invalid_type" , "required" => "value_is_mandatory" } ,
1111 "properties" => {
12- "add_ons " => {
12+ "addOns " => {
1313 "type" => "array" ,
1414 "x-error" => { "type" => "invalid_type" , "minItems" => "invalid_count" } ,
1515 "items" => {
1616 "type" => "object" ,
1717 "additionalProperties" => { "not" => { } , "x-error" => "unsupported_key" } ,
1818 "x-error" => { "type" => "invalid_type" , "required" => "value_is_mandatory" } ,
19- "required" => %w[ id local_id ] ,
19+ "required" => %w[ id localId payload ] ,
2020 "properties" => {
2121 "id" => {
2222 "type" => "string" ,
2323 "format" => "uuid" ,
2424 "x-error" => { "type" => "invalid_type" , "format" => "invalid_format" }
2525 } ,
26- "local_id " => {
26+ "localId " => {
2727 "type" => "string" ,
2828 "minLength" => 1 ,
2929 "x-error" => { "type" => "invalid_type" , "minLength" => "invalid_value" }
3030 } ,
3131 "payload" => {
3232 "type" => "object" ,
33- "additionalProperties" => { "not" => { } , "x-error" => "unsupported_key" } ,
3433 "x-error" => { "type" => "invalid_type" , "required" => "value_is_mandatory" } ,
3534 "properties" => {
3635 "code" => {
@@ -43,26 +42,22 @@ module Schema
4342 "exclusiveMinimum" => 0 ,
4443 "x-error" => { "type" => "invalid_type" , "exclusiveMinimum" => "invalid_value" }
4544 } ,
46- "unit_amount_cents " => {
45+ "unitAmountCents " => {
4746 "type" => "integer" ,
4847 "minimum" => 0 ,
4948 "x-error" => { "type" => "invalid_type" , "minimum" => "invalid_value" }
5049 } ,
51- "total_amount_cents " => {
50+ "totalAmountCents " => {
5251 "type" => "integer" ,
5352 "minimum" => 0 ,
5453 "x-error" => { "type" => "invalid_type" , "minimum" => "invalid_value" }
5554 } ,
56- "invoice_display_name" => {
57- "type" => %w[ string null ] ,
58- "x-error" => { "type" => "invalid_type" }
59- } ,
60- "from_datetime" => {
55+ "fromDatetime" => {
6156 "type" => %w[ string null ] ,
6257 "format" => "date-time" ,
6358 "x-error" => { "type" => "invalid_type" , "format" => "invalid_format" }
6459 } ,
65- "to_datetime " => {
60+ "toDatetime " => {
6661 "type" => %w[ string null ] ,
6762 "format" => "date-time" ,
6863 "x-error" => { "type" => "invalid_type" , "format" => "invalid_format" }
@@ -84,27 +79,27 @@ module Schema
8479 "exclusiveMinimum" => 0 ,
8580 "x-error" => { "type" => "invalid_type" , "exclusiveMinimum" => "invalid_value" }
8681 } ,
87- "unit_amount_cents " => {
82+ "unitAmountCents " => {
8883 "type" => "integer" ,
8984 "minimum" => 0 ,
9085 "x-error" => { "type" => "invalid_type" , "minimum" => "invalid_value" }
9186 } ,
92- "total_amount_cents " => {
87+ "totalAmountCents " => {
9388 "type" => "integer" ,
9489 "minimum" => 0 ,
9590 "x-error" => { "type" => "invalid_type" , "minimum" => "invalid_value" }
9691 } ,
97- "invoice_display_name " => {
92+ "invoiceDisplayName " => {
9893 "type" => "string" ,
9994 "minLength" => 1 ,
10095 "x-error" => { "type" => "invalid_type" , "minLength" => "invalid_value" }
10196 } ,
102- "from_datetime " => {
97+ "fromDatetime " => {
10398 "type" => %w[ string null ] ,
10499 "format" => "date-time" ,
105100 "x-error" => { "type" => "invalid_type" , "format" => "invalid_format" }
106101 } ,
107- "to_datetime " => {
102+ "toDatetime " => {
108103 "type" => %w[ string null ] ,
109104 "format" => "date-time" ,
110105 "x-error" => { "type" => "invalid_type" , "format" => "invalid_format" }
@@ -118,13 +113,12 @@ module Schema
118113 } . freeze
119114
120115 APPROVE_DEFINITION = UPDATE_DEFINITION . deep_dup . tap do |schema |
121- schema [ "required" ] = [ "add_ons " ]
116+ schema [ "required" ] = [ "addOns " ]
122117
123- add_ons = schema [ "properties" ] [ "add_ons " ]
118+ add_ons = schema [ "properties" ] [ "addOns " ]
124119 add_ons [ "minItems" ] = 1
125- add_ons [ "items" ] [ "required" ] += [ "payload" ]
126120 add_ons [ "items" ] [ "properties" ] [ "payload" ] [ "required" ] =
127- %w[ code units unit_amount_cents total_amount_cents ]
121+ %w[ code units unitAmountCents totalAmountCents ]
128122 end . freeze
129123
130124 SCHEMERS = {
0 commit comments